From 1967a49cd997bf188bd63066e688e979d73759f9 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 27 May 2015 10:21:28 +0200 Subject: bump pyOpenSSL and cryptography dependencies --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8e3d51b8..86a55c4c 100644 --- a/setup.py +++ b/setup.py @@ -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 +) -- cgit v1.2.3 From d6a68e1394ac57854ac1fa09fd19b88d015789e1 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 27 May 2015 10:21:50 +0200 Subject: remove outdated workarounds --- netlib/tcp.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 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. -- cgit v1.2.3