Skip to content

Instantly share code, notes, and snippets.

View inean's full-sized avatar

Carlos Martín inean

  • Independent Developer
  • Spain
View GitHub Profile
@jpf
jpf / validate_ssl_pin.py
Created March 3, 2015 02:15
How to implmement TLS Public Key Pinning in Python (Sort of modeled after HKPK)
import urllib3
from urllib3 import HTTPSConnectionPool
import certifi
import base64
import M2Crypto
import hashlib
class TestHTTPSConnectionPool(HTTPSConnectionPool):
def _validate_conn(self, conn):