[pypy-commit] pypy default: Copy the logic from bindings.py that only calls
arigo
pypy.commits at gmail.com
Sat Aug 17 04:21:51 EDT 2019
Author: Armin Rigo <arigo at tunes.org>
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():
More information about the pypy-commit
mailing list