10000 [3.8] bpo-38137: Re-add OpenSSL 1.0.2 compat (GH-16051) (GH-16057) · python/cpython@36c29e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 36c29e4

Browse files
matrixisemiss-islington
authored andcommitted
[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 9a4963b) Co-authored-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue38137 Automerge-Triggered-By: @matrixise
1 parent 307c5fe commit 36c29e4

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)
0