[Python-checkins] [3.7] bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140) (GH-16200)

Miss Islington (bot) webhook-mailer at python.org
Mon Sep 16 15:49:11 EDT 2019


https://github.com/python/cpython/commit/c55f69552cdab26362c1ff4416fe1c3e9b27ccbe
commit: c55f69552cdab26362c1ff4416fe1c3e9b27ccbe
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-09-16T12:49:07-07:00
summary:

[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 724f1a57231f9287c37255adf0e4364d12cf693d)


Co-authored-by: Christian Heimes <christian at python.org>


https://bugs.python.org/issue33936



Automerge-Triggered-By: @tiran

files:
A Misc/NEWS.d/next/Library/2019-09-14-10-34-00.bpo-33936.8wCI_n.rst
M 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
index 000000000000..7bc7fed483a2
--- /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 b69f16c61a50..b13ade604961 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -1073,7 +1073,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();



More information about the Python-checkins mailing list