Skip to content

Commit c55f695

Browse files
[3.7] bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140) (GH-16200)
``OPENSSL_VERSION_1_1`` was never defined in ``_hashopenssl.c``. https://bugs.python.org/issue33936 (cherry picked from commit 724f1a5) Co-authored-by: Christian Heimes <[email protected]> https://bugs.python.org/issue33936 Automerge-Triggered-By: @tiran
1 parent 4651a7a commit c55f695

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_hashlib no longer calls obsolete OpenSSL initialization function with
2+
OpenSSL 1.1.0+.

Modules/_hashopenssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ PyInit__hashlib(void)
10731073
{
10741074
PyObject *m, *openssl_md_meth_names;
10751075

1076-
#ifndef OPENSSL_VERSION_1_1
1076+
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
10771077
/* Load all digest algorithms and initialize cpuid */
10781078
OPENSSL_add_all_algorithms_noconf();
10791079
ERR_load_crypto_strings();

0 commit comments

Comments
 (0)