diff options
author | Christian Heimes <christian@python.org> | 2020-05-15 18:55:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-15 18:55:25 (GMT) |
commit | c087a268a4d4ead8ef2ca21e325423818729da89 (patch) | |
tree | a1cd42a9530e9d7ac9174a2882adc9e1ead6a8e9 /Modules/_hashopenssl.c | |
parent | 62d618c06bd395308b7163dbcb26c7e6d0922033 (diff) | |
download | cpython-c087a268a4d4ead8ef2ca21e325423818729da89.zip cpython-c087a268a4d4ead8ef2ca21e325423818729da89.tar.gz cpython-c087a268a4d4ead8ef2ca21e325423818729da89.tar.bz2 |
bpo-40515: Require OPENSSL_THREADS (GH-19953)
The ``ssl`` and ``hashlib`` modules now actively check that OpenSSL is
build with thread support. Python 3.7.0 made thread support mandatory and no
longer works safely with a no-thread builds.
Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Modules/_hashopenssl.c')
-rw-r--r-- | Modules/_hashopenssl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index b7661b4..b55ac93 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -27,6 +27,10 @@ #include <openssl/crypto.h> // FIPS_mode() +#ifndef OPENSSL_THREADS +# error "OPENSSL_THREADS is not defined, Python requires thread-safe OpenSSL" +#endif + #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) /* OpenSSL < 1.1.0 */ #define EVP_MD_CTX_new EVP_MD_CTX_create |