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
This commit is contained in:
Christian Heimes 2019-09-12 16:33:26 +02:00 committed by Miss Islington (bot)
parent 4ffd05d7ec
commit 9a4963b932
1 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,12 @@
#include <openssl/objects.h> #include <openssl/objects.h>
#include "openssl/err.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 #define MUNCH_SIZE INT_MAX
typedef struct { typedef struct {