#include "config.h"
#endif
#include <openssl/aes.h>
-#if OPENSSL_VERSION_NUMBER > 0x1000100fL
+#if OPENSSL_VERSION_NUMBER > 0x1000100fL && !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.
if(!g_initialized)
abort();
uint32_t out;
-#if OPENSSL_VERSION_NUMBER > 0x1000100fL
+#if OPENSSL_VERSION_NUMBER > 0x1000100fL && !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);
#include "opensslsigners.hh"
#include "dnssecinfra.hh"
-#if OPENSSL_VERSION_NUMBER < 0x1010000fL
+#if (OPENSSL_VERSION_NUMBER < 0x1010000fL || defined LIBRESSL_VERSION_NUMBER)
/* OpenSSL < 1.1.0 needs support for threading/locking in the calling application. */
static pthread_mutex_t *openssllocks;