]> granicus.if.org Git - pdns/commitdiff
Bump version requirement for CRYPTO_ctr128_encrypt
authorChristian Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Fri, 2 Sep 2016 19:55:52 +0000 (21:55 +0200)
committerChristian Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Fri, 2 Sep 2016 19:55:55 +0000 (21:55 +0200)
While CRYPTO_ctr128_encrypt should be available in 1.0.1,
apparently in some library builds (Ubuntu) one can not link
against it.

pdns/dns_random.cc

index e772571b4c0a8be7d8dfb655f61fca47a982986e..873de38622e438221ecc6df664e19c1dda5ae171 100644 (file)
@@ -24,7 +24,7 @@
 #endif
 #include <openssl/aes.h>
 #include <openssl/opensslv.h>
-#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);