Skip to content

Commit 9a4963b

Browse files
tiranmiss-islington
authored andcommitted
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
1 parent 4ffd05d commit 9a4963b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Modules/_hashopenssl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
#include <openssl/objects.h>
2727
#include "openssl/err.h"
2828

29+
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
30+
/* OpenSSL < 1.1.0 */
31+
#define EVP_MD_CTX_new EVP_MD_CTX_create
32+
#define EVP_MD_CTX_free EVP_MD_CTX_destroy
33+
#endif
34+
2935
#define MUNCH_SIZE INT_MAX
3036

3137
typedef struct {

0 commit comments

Comments
 (0)