From b3bc0247024f64f5b7acfe1297107cf25b3cee8f Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 14 Sep 2019 10:35:08 +0200 Subject: [PATCH] bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ Signed-off-by: Christian Heimes --- .../next/Library/2019-09-14-10-34-00.bpo-33936.8wCI_n.rst | 2 ++ Modules/_hashopenssl.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2019-09-14-10-34-00.bpo-33936.8wCI_n.rst diff --git a/Misc/NEWS.d/next/Library/2019-09-14-10-34-00.bpo-33936.8wCI_n.rst b/Misc/NEWS.d/next/Library/2019-09-14-10-34-00.bpo-33936.8wCI_n.rst new file mode 100644 index 00000000000000..7bc7fed483a2ea --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-09-14-10-34-00.bpo-33936.8wCI_n.rst @@ -0,0 +1,2 @@ +_hashlib no longer calls obsolete OpenSSL initialization function with +OpenSSL 1.1.0+. diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index 29ebec77a4b33c..66bd65bf00cfce 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -1129,7 +1129,7 @@ PyInit__hashlib(void) { 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 */ OPENSSL_add_all_algorithms_noconf(); ERR_load_crypto_strings();