From f81c3ada9ceacc0efae2b907421c5f6982570c1a Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Wed, 2 Nov 2016 16:20:46 +0100 Subject: [PATCH] libcrypto: Remove AES_ctr128_encrypt() This is for OpenSSL 1.1.0. Cherry-picked from d73f665edddfaa8f5a51e4c294d205f6e60a5854 Signed-off-by: Jakub Jelen Reviewed-by: Andreas Schneider --- src/libcrypto.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcrypto.c b/src/libcrypto.c index 00f107f7..8d1fd4d8 100644 --- a/src/libcrypto.c +++ b/src/libcrypto.c @@ -43,6 +43,7 @@ #include #include #include +#include #ifdef HAVE_OPENSSL_AES_H #define HAS_AES @@ -455,7 +456,12 @@ static void aes_ctr128_encrypt(struct ssh_cipher_struct *cipher, void *in, void * Same for num, which is being used to store the current offset in blocksize in CTR * function. */ +# if OPENSSL_VERSION_NUMBER >= 0x10100000L + CRYPTO_ctr128_encrypt(in, out, len, cipher->key, cipher->IV, tmp_buffer, + &num, (block128_f)AES_encrypt); +# else AES_ctr128_encrypt(in, out, len, cipher->key, cipher->IV, tmp_buffer, &num); +# endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ } #endif /* BROKEN_AES_CTR */ #endif /* HAS_AES */