1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

libcrypto-compat: Check if EVP_CIPHER_CTX_new is needed

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2017-02-23 16:54:45 +01:00
parent c7e9dc2ee3
commit 73e8277072

View File

@@ -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