1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-21 14:00:51 +03:00

Revert "aes: the init function fails when OpenSSL has AES support"

This partially reverts commit f4f2298ef3
because it caused the compatibility code to call initialization routines
redundantly, leading to memory leakage with OpenSSL 1.1 and broken curl
test-suite in Fedora:

88 bytes in 1 blocks are definitely lost in loss record 5 of 8
   at 0x4C2DB8D: malloc (vg_replace_malloc.c:299)
   by 0x72C607D: CRYPTO_zalloc (mem.c:100)
   by 0x72A2480: EVP_CIPHER_meth_new (cmeth_lib.c:18)
   by 0x4E5A550: make_ctr_evp.isra.0 (openssl.c:407)
   by 0x4E5A8E8: _libssh2_init_aes_ctr (openssl.c:471)
   by 0x4E5BB5A: libssh2_init (global.c:49)
This commit is contained in:
Kamil Dudka
2016-10-20 17:22:31 +02:00
parent 29bcf75fb1
commit e9207ee2d1

View File

@@ -265,7 +265,7 @@ _libssh2_cipher_crypt(_libssh2_cipher_ctx * ctx,
return ret == 1 ? 0 : 1;
}
#if LIBSSH2_AES_CTR
#if LIBSSH2_AES_CTR && !defined(HAVE_EVP_AES_128_CTR)
#include <openssl/aes.h>
#include <openssl/evp.h>