From a1f7d9ad7031d2de7288fe6b59cba18554829bd3 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Fri, 2 Sep 2016 21:55:52 +0200 Subject: [PATCH] Bump version requirement for CRYPTO_ctr128_encrypt While CRYPTO_ctr128_encrypt should be available in 1.0.1, apparently in some library builds (Ubuntu) one can not link against it. (cherry picked from commit 3e4b01664660f1a8d9564508843a7e51b8f7549e) --- pdns/dns_random.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/dns_random.cc b/pdns/dns_random.cc index e772571b4..873de3862 100644 --- a/pdns/dns_random.cc +++ b/pdns/dns_random.cc @@ -24,7 +24,7 @@ #endif #include #include -#if OPENSSL_VERSION_NUMBER > 0x1000100fL && !defined LIBRESSL_VERSION_NUMBER +#if OPENSSL_VERSION_NUMBER > 0x1010000fL && !defined LIBRESSL_VERSION_NUMBER // Older OpenSSL does not have CRYPTO_ctr128_encrypt. Before 1.1.0 the header // file did not have the necessary extern "C" wrapper. In 1.1.0, AES_ctr128_encrypt // was removed. @@ -75,7 +75,7 @@ unsigned int dns_random(unsigned int n) if(!g_initialized) abort(); uint32_t out; -#if OPENSSL_VERSION_NUMBER > 0x1000100fL && !defined LIBRESSL_VERSION_NUMBER +#if OPENSSL_VERSION_NUMBER > 0x1010000fL && !defined LIBRESSL_VERSION_NUMBER CRYPTO_ctr128_encrypt((const unsigned char*)&g_in, (unsigned char*) &out, sizeof(g_in), &aes_key, g_counter, g_stream, &g_offset, (block128_f) AES_encrypt); #else AES_ctr128_encrypt((const unsigned char*)&g_in, (unsigned char*) &out, sizeof(g_in), &aes_key, g_counter, g_stream, &g_offset); -- 2.40.0