bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140)

``OPENSSL_VERSION_1_1`` was never defined in ``_hashopenssl.c``. 


https://bugs.python.org/issue33936
This commit is contained in:
Christian Heimes 2019-09-16 21:10:05 +02:00 committed by Miss Islington (bot)
parent 336b3064d8
commit 724f1a5723
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
_hashlib no longer calls obsolete OpenSSL initialization function with
OpenSSL 1.1.0+.

View File

@ -1138,7 +1138,7 @@ PyInit__hashlib(void)
{ {
PyObject *m, *openssl_md_meth_names; PyObject *m, *openssl_md_meth_names;
#ifndef OPENSSL_VERSION_1_1 #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
/* Load all digest algorithms and initialize cpuid */ /* Load all digest algorithms and initialize cpuid */
OPENSSL_add_all_algorithms_noconf(); OPENSSL_add_all_algorithms_noconf();
ERR_load_crypto_strings(); ERR_load_crypto_strings();