From: Christian Heimes Date: Thu, 12 Sep 2019 14:33:26 +0000 (+0200) Subject: bpo-38137: Re-add OpenSSL 1.0.2 compat (GH-16051) X-Git-Tag: v3.9.0a1~476 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a4963b932a087b78596cca0b8394ac898faa490;p=thirdparty%2FPython%2Fcpython.git bpo-38137: Re-add OpenSSL 1.0.2 compat (GH-16051) The defines are required for OpenSSL 1.0.2 and LibreSSL. https://bugs.python.org/issue38134 Automerge-Triggered-By: @tiran --- 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 #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 {