aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2019-09-12 16:33:26 +0200
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-09-12 07:33:26 -0700
commit9a4963b932a087b78596cca0b8394ac898faa490 (patch)
tree1fad01f33eeedf90fc86ce3284f76b1fdae4e39c /Modules
parentbpo-21872: fix lzma library decompresses data incompletely (GH-14048) (diff)
downloadcpython-9a4963b932a087b78596cca0b8394ac898faa490.tar.gz
cpython-9a4963b932a087b78596cca0b8394ac898faa490.tar.bz2
cpython-9a4963b932a087b78596cca0b8394ac898faa490.zip
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
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_hashopenssl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index bea7e5ed312..c685279c7a7 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 {