Merge pull request #468 from renaudallard/develop

Added checks for LibreSSL and OpenBSD
This commit is contained in:
Willem Toorop 2021-05-26 11:18:20 +02:00 committed by GitHub
commit 8abc3b62b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -102,7 +102,7 @@ elseif (APPLE)
elseif (UNIX)
set(HOSTOS "unix")
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600")
endif ()
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

View File

@ -48,19 +48,21 @@
#include "context.h"
#include "const-info.h"
#ifdef USE_DANESSL
#if defined(USE_DANESSL) || defined(LIBRESSL_VERSION_NUMBER)
# include "ssl_dane/danessl.h"
#endif
#include "tls.h"
/* Double check configure has worked as expected. */
#ifndef LIBRESSL_VERSION_NUMBER
#if defined(USE_DANESSL) && \
(defined(HAVE_SSL_DANE_ENABLE) || \
defined(HAVE_OPENSSL_INIT_CRYPTO) || \
defined(HAVE_SSL_CTX_DANE_ENABLE))
#error Configure error USE_DANESSL defined with OpenSSL 1.1 functions!
#endif
#endif
/* Cipher suites recommended in RFC7525. */
static char const * const _getdns_tls_context_default_cipher_list =