diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-03-10 17:29:27 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-03-10 17:29:27 +1300 |
commit | f5cc63d653b27210d9c3d7646c01c3a9d540d9c7 (patch) | |
tree | c52924dd1e31bd465751491166a4774d1e9ea49d /netlib/certutils.py | |
parent | 2a12aa3c47d57cc2d3a36f6726a5f081ca493457 (diff) | |
download | mitmproxy-f5cc63d653b27210d9c3d7646c01c3a9d540d9c7.tar.gz mitmproxy-f5cc63d653b27210d9c3d7646c01c3a9d540d9c7.tar.bz2 mitmproxy-f5cc63d653b27210d9c3d7646c01c3a9d540d9c7.zip |
Certificate flags
Diffstat (limited to 'netlib/certutils.py')
-rw-r--r-- | netlib/certutils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/netlib/certutils.py b/netlib/certutils.py index 19148382..92b219ee 100644 --- a/netlib/certutils.py +++ b/netlib/certutils.py @@ -111,6 +111,7 @@ class DNTree: return current.value + class CertStore: """ Implements an in-memory certificate store. @@ -222,6 +223,11 @@ class CertStore: c = (c, None) return (c[0], c[1] or self.privkey) + def gen_pkey(self, cert): + import certffi + certffi.set_flags(self.privkey, 1) + return self.privkey + class _GeneralName(univ.Choice): # We are only interested in dNSNames. We use a default handler to ignore @@ -326,6 +332,7 @@ class SSLCert: return altnames + def get_remote_cert(host, port, sni): c = tcp.TCPClient((host, port)) c.connect() |