Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r97201:aa592738d692
Date: 2019-08-17 10:21 +0200
http://bitbucket.org/pypy/pypy/changeset/aa592738d692/

Log:    Copy the logic from bindings.py that only calls
        Cryptography_setup_ssl_threads() in some cases. In other cases the
        function might be NULL.

diff --git a/lib_pypy/_cffi_ssl/_stdssl/__init__.py 
b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
--- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py
+++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
@@ -120,7 +120,9 @@
 # init open ssl
 lib.SSL_load_error_strings()
 lib.SSL_library_init()
-lib.Cryptography_setup_ssl_threads()
+if (lib.Cryptography_HAS_LOCKING_CALLBACKS and
+        lib.CRYPTO_get_locking_callback() == ffi.NULL):
+    lib.Cryptography_setup_ssl_threads()
 lib.OpenSSL_add_all_algorithms()
 
 def check_signals():
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to