]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 16 Sep 2019 19:48:03 +0000 (12:48 -0700)
committerGitHub <noreply@github.com>
Mon, 16 Sep 2019 19:48:03 +0000 (12:48 -0700)
``OPENSSL_VERSION_1_1`` was never defined in ``_hashopenssl.c``.

https://bugs.python.org/issue33936
(cherry picked from commit 724f1a57231f9287c37255adf0e4364d12cf693d)

Co-authored-by: Christian Heimes <christian@python.org>
Misc/NEWS.d/next/Library/2019-09-14-10-34-00.bpo-33936.8wCI_n.rst [new file with mode: 0644]
Modules/_hashopenssl.c

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 (file)
index 0000000..7bc7fed
--- /dev/null
@@ -0,0 +1,2 @@
+_hashlib no longer calls obsolete OpenSSL initialization function with
+OpenSSL 1.1.0+.
index 0e29fe1d3301d336a31092be889e0b7f7a708aef..84906a4da4f57b3d22089c119b3ede5550790746 100644 (file)
@@ -1105,7 +1105,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();