mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 18:29:50 +09:00
libcrypto: Remove AES_ctr128_encrypt()
This is for OpenSSL 1.1.0.
Cherry-picked from d73f665edd
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
83663895f4
commit
f81c3ada9c
@@ -43,6 +43,7 @@
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/modes.h>
|
||||
|
||||
#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 */
|
||||
|
||||
Reference in New Issue
Block a user