From 73e8277072315ec3d00c0e643fa804ed76d45e0f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 23 Feb 2017 16:54:45 +0100 Subject: [PATCH] libcrypto-compat: Check if EVP_CIPHER_CTX_new is needed Signed-off-by: Andreas Schneider --- src/libcrypto-compat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcrypto-compat.c b/src/libcrypto-compat.c index e0c95ff2..3e1bc71a 100644 --- a/src/libcrypto-compat.c +++ b/src/libcrypto-compat.c @@ -7,6 +7,8 @@ * https://www.openssl.org/source/license.html */ +#include "config.h" + #include #include #include "libcrypto-compat.h" @@ -315,6 +317,7 @@ int HMAC_CTX_reset(HMAC_CTX *ctx) return 1; } +#ifndef HAVE_OPENSSL_EVP_CIPHER_CTX_NEW EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void) { return OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX)); @@ -326,3 +329,4 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) EVP_CIPHER_CTX_init(ctx); OPENSSL_free(ctx); } +#endif