From: Christian Hofstaedtler Date: Fri, 2 Sep 2016 19:55:52 +0000 (+0200) Subject: Bump version requirement for CRYPTO_ctr128_encrypt X-Git-Tag: dnsdist-1.1.0-beta2~147^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e4b01664660f1a8d9564508843a7e51b8f7549e;p=pdns 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. --- 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);