aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2017-02-23 16:54:45 +0100
committerAndreas Schneider <asn@cryptomilk.org>2017-02-23 16:59:28 +0100
commit73e8277072315ec3d00c0e643fa804ed76d45e0f (patch)
tree21ee9161a2304e2f43097e2d082462c92378732b
parentc7e9dc2ee39d08798c6a608fc06109287dfae774 (diff)
downloadlibssh-73e8277072315ec3d00c0e643fa804ed76d45e0f.tar.gz
libssh-73e8277072315ec3d00c0e643fa804ed76d45e0f.tar.xz
libssh-73e8277072315ec3d00c0e643fa804ed76d45e0f.zip
libcrypto-compat: Check if EVP_CIPHER_CTX_new is needed
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/libcrypto-compat.c4
1 files changed, 4 insertions, 0 deletions
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 <string.h>
#include <openssl/engine.h>
#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