diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-05-27 20:33:03 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-05-27 20:33:03 +1200 |
commit | f7b75ba8c21c66e38da81adf3b2c573b7dae87f3 (patch) | |
tree | 63fb59647bfb8380fff46ca43d026338f24e24b0 | |
parent | 3f25df0b122c08ff3c14f2e95a905905028793aa (diff) | |
parent | d6a68e1394ac57854ac1fa09fd19b88d015789e1 (diff) | |
download | mitmproxy-f7b75ba8c21c66e38da81adf3b2c573b7dae87f3.tar.gz mitmproxy-f7b75ba8c21c66e38da81adf3b2c573b7dae87f3.tar.bz2 mitmproxy-f7b75ba8c21c66e38da81adf3b2c573b7dae87f3.zip |
Merge pull request #58 from Kriechi/update-openssl
Update openssl
-rw-r--r-- | netlib/tcp.py | 12 | ||||
-rw-r--r-- | setup.py | 5 |
2 files changed, 7 insertions, 10 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py index a5f43ea3..399203bb 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -307,10 +307,10 @@ class _Connection(object): def get_current_cipher(self): if not self.ssl_established: return None - c = SSL._lib.SSL_get_current_cipher(self.connection._ssl) - name = SSL._native(SSL._ffi.string(SSL._lib.SSL_CIPHER_get_name(c))) - bits = SSL._lib.SSL_CIPHER_get_bits(c, SSL._ffi.NULL) - version = SSL._native(SSL._ffi.string(SSL._lib.SSL_CIPHER_get_version(c))) + + name = self.connection.get_cipher_name() + bits = self.connection.get_cipher_bits() + version = self.connection.get_cipher_version() return name, bits, version def finish(self): @@ -333,10 +333,6 @@ class _Connection(object): self.connection.shutdown() except SSL.Error: pass - except KeyError as e: # pragma: no cover - # Workaround for https://github.com/pyca/pyopenssl/pull/183 - if OpenSSL.__version__ != "0.14": - raise e """ Creates an SSL Context. @@ -40,7 +40,8 @@ setup( install_requires=[ "pyasn1>=0.1.7", - "pyOpenSSL>=0.14", + "pyOpenSSL>=0.15.1", + "cryptography>=0.9", "passlib>=1.6.2" ], extras_require={ @@ -52,4 +53,4 @@ setup( "pathod>=%s, <%s" % (version.MINORVERSION, version.NEXT_MINORVERSION) ] } -)
\ No newline at end of file +) |