aboutsummaryrefslogtreecommitdiff
path: root/src/libcrypto.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2016-11-06 15:43:31 +0100
committerAndreas Schneider <asn@cryptomilk.org>2016-11-07 11:46:47 +0100
commit3daf1760a18c091159338fc9077fa71bfbd726a1 (patch)
tree8c7efa191808a9b92e8aef53dee0321c57ba5dee /src/libcrypto.c
parent2dff359a331c5c9aab2435c470596b0fee7a502a (diff)
downloadlibssh-3daf1760a18c091159338fc9077fa71bfbd726a1.tar.gz
libssh-3daf1760a18c091159338fc9077fa71bfbd726a1.tar.xz
libssh-3daf1760a18c091159338fc9077fa71bfbd726a1.zip
cmake: Use configure check for CRYPTO_ctr128_encrypt
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/libcrypto.c')
-rw-r--r--src/libcrypto.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcrypto.c b/src/libcrypto.c
index 10956b6f..867bf227 100644
--- a/src/libcrypto.c
+++ b/src/libcrypto.c
@@ -594,11 +594,11 @@ static void aes_ctr_encrypt(struct ssh_cipher_struct *cipher, void *in, void *ou
* Same for num, which is being used to store the current offset in blocksize in CTR
* function.
*/
-# if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#ifdef HAVE_OPENSSL_CRYPTO_CTR128_ENCRYPT
CRYPTO_ctr128_encrypt(in, out, len, &cipher->aes_key->key, cipher->aes_key->IV, tmp_buffer, &num, (block128_f)AES_encrypt);
-# else
+#else
AES_ctr128_encrypt(in, out, len, &cipher->aes_key->key, cipher->aes_key->IV, tmp_buffer, &num);
-# endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
+#endif /* HAVE_OPENSSL_CRYPTO_CTR128_ENCRYPT */
}
static void aes_ctr_cleanup(struct ssh_cipher_struct *cipher){