[Python-checkins] [3.8] bpo-38137: Re-add OpenSSL 1.0.2 compat (GH-16051) (GH-16057)

Miss Islington (bot) webhook-mailer at python.org
Thu Sep 12 10:57:06 EDT 2019


https://github.com/python/cpython/commit/36c29e444d6bc0e31b46509610d3fb7cff74f2c2
commit: 36c29e444d6bc0e31b46509610d3fb7cff74f2c2
branch: 3.8
author: Stéphane Wirtel <stephane at wirtel.be>
committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
date: 2019年09月12日T07:57:03-07:00
summary:
[3.8] bpo-38137: Re-add OpenSSL 1.0.2 compat (GH-16051) (GH-16057)
The defines are required for OpenSSL 1.0.2 and LibreSSL.
https://bugs.python.org/issue38134
Automerge-Triggered-By: @tiran
(cherry picked from commit 9a4963b932a087b78596cca0b8394ac898faa490)
Co-authored-by: Christian Heimes <christian at python.org>
https://bugs.python.org/issue38137
Automerge-Triggered-By: @matrixise
files:
M Modules/_hashopenssl.c
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index bea7e5ed3123..c685279c7a7b 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -26,6 +26,12 @@
 #include <openssl/objects.h>
 #include "openssl/err.h"
 
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+/* OpenSSL < 1.1.0 */
+#define EVP_MD_CTX_new EVP_MD_CTX_create
+#define EVP_MD_CTX_free EVP_MD_CTX_destroy
+#endif
+
 #define MUNCH_SIZE INT_MAX
 
 typedef struct {


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /