Merge pull request #58 from Kriechi/update-openssl

Update openssl
This commit is contained in:
Aldo Cortesi 2015-05-27 20:33:03 +12:00
commit f7b75ba8c2
2 changed files with 7 additions and 10 deletions

View File

@ -307,10 +307,10 @@ class _Connection(object):
def get_current_cipher(self): def get_current_cipher(self):
if not self.ssl_established: if not self.ssl_established:
return None 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))) name = self.connection.get_cipher_name()
bits = SSL._lib.SSL_CIPHER_get_bits(c, SSL._ffi.NULL) bits = self.connection.get_cipher_bits()
version = SSL._native(SSL._ffi.string(SSL._lib.SSL_CIPHER_get_version(c))) version = self.connection.get_cipher_version()
return name, bits, version return name, bits, version
def finish(self): def finish(self):
@ -333,10 +333,6 @@ class _Connection(object):
self.connection.shutdown() self.connection.shutdown()
except SSL.Error: except SSL.Error:
pass 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. Creates an SSL Context.

View File

@ -40,7 +40,8 @@ setup(
install_requires=[ install_requires=[
"pyasn1>=0.1.7", "pyasn1>=0.1.7",
"pyOpenSSL>=0.14", "pyOpenSSL>=0.15.1",
"cryptography>=0.9",
"passlib>=1.6.2" "passlib>=1.6.2"
], ],
extras_require={ extras_require={
@ -52,4 +53,4 @@ setup(
"pathod>=%s, <%s" % (version.MINORVERSION, version.NEXT_MINORVERSION) "pathod>=%s, <%s" % (version.MINORVERSION, version.NEXT_MINORVERSION)
] ]
} }
) )