diff options
Diffstat (limited to 'src/cryptography')
-rw-r--r-- | src/cryptography/hazmat/bindings/openssl/_conditional.py | 1 | ||||
-rw-r--r-- | src/cryptography/hazmat/bindings/openssl/binding.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py index 6cfd29fc..f477f6ab 100644 --- a/src/cryptography/hazmat/bindings/openssl/_conditional.py +++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py @@ -143,6 +143,7 @@ def cryptography_has_locking_callbacks(): "CRYPTO_READ", "CRYPTO_LOCK_SSL", "CRYPTO_lock", + "Cryptography_setup_ssl_threads", ] diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py index 81cf547a..ec74d4cf 100644 --- a/src/cryptography/hazmat/bindings/openssl/binding.py +++ b/src/cryptography/hazmat/bindings/openssl/binding.py @@ -140,7 +140,8 @@ class Binding(object): # the setup for this. __import__("_ssl") - if cls.lib.CRYPTO_get_locking_callback() != cls.ffi.NULL: + if (not cls.lib.Cryptography_HAS_LOCKING_CALLBACKS or + cls.lib.CRYPTO_get_locking_callback() != cls.ffi.NULL): return # If nothing else has setup a locking callback already, we set up |