Skip to content

Commit

Permalink
bpo-38137: Re-add OpenSSL 1.0.2 compat (pythonGH-16051)
Browse files Browse the repository at this point in the history
The defines are required for OpenSSL 1.0.2 and LibreSSL.


https://bugs.python.org/issue38134



Automerge-Triggered-By: @tiran
  • Loading branch information
tiran authored and miss-islington committed Sep 12, 2019
1 parent 4ffd05d commit 9a4963b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Modules/_hashopenssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9a4963b

Please sign in to comment.