Lines 1-31
Link Here
|
1 |
--- dns_random.cc.orig 2016-07-29 14:32:32 UTC |
|
|
2 |
+++ dns_random.cc |
3 |
@@ -2,7 +2,7 @@ |
4 |
#include "config.h" |
5 |
#endif |
6 |
#include <openssl/aes.h> |
7 |
-#if OPENSSL_VERSION_NUMBER > 0x1000100fL |
8 |
+#if OPENSSL_VERSION_NUMBER > 0x1000100fL && !defined LIBRESSL_VERSION_NUMBER |
9 |
// Older OpenSSL does not have CRYPTO_ctr128_encrypt. Before 1.1.0 the header |
10 |
// file did not have the necessary extern "C" wrapper. In 1.1.0, AES_ctr128_encrypt |
11 |
// was removed. |
12 |
@@ -53,7 +53,7 @@ unsigned int dns_random(unsigned int n) |
13 |
if(!g_initialized) |
14 |
abort(); |
15 |
uint32_t out; |
16 |
-#if OPENSSL_VERSION_NUMBER > 0x1000100fL |
17 |
+#if OPENSSL_VERSION_NUMBER > 0x1000100fL && !defined LIBRESSL_VERSION_NUMBER |
18 |
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); |
19 |
#else |
20 |
AES_ctr128_encrypt((const unsigned char*)&g_in, (unsigned char*) &out, sizeof(g_in), &aes_key, g_counter, g_stream, &g_offset); |
21 |
--- opensslsigners.cc.orig 2016-07-29 14:32:32 UTC |
22 |
+++ opensslsigners.cc |
23 |
@@ -12,7 +12,7 @@ |
24 |
#include "opensslsigners.hh" |
25 |
#include "dnssecinfra.hh" |
26 |
|
27 |
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL |
28 |
+#if (OPENSSL_VERSION_NUMBER < 0x1010000fL || defined LIBRESSL_VERSION_NUMBER) |
29 |
/* OpenSSL < 1.1.0 needs support for threading/locking in the calling application. */ |
30 |
static pthread_mutex_t *openssllocks; |
31 |
|