From: Arran Cudbard-Bell Date: Fri, 12 Apr 2019 16:19:42 +0000 (+0200) Subject: Remove libressl version checks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9652affe38f41ba2484e013cf9d2c0bcb8c80d67;p=thirdparty%2Ffreeradius-server.git Remove libressl version checks If someone wants to contribute checks which use actual LibreSSL version numbers, so we're not stuck supporting the initial API version of LibreSSL at the point it was forked from OpenSSL, then they're welcome to do so, otherwise we will not continue to support these lazy, short sighted hacks. --- diff --git a/src/lib/tls/missing.h b/src/lib/tls/missing.h index 5cae7e0a072..4865020000b 100644 --- a/src/lib/tls/missing.h +++ b/src/lib/tls/missing.h @@ -17,7 +17,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER < 0x10100000L # define EVP_MD_CTX_new EVP_MD_CTX_create # define EVP_MD_CTX_free EVP_MD_CTX_destroy # define EVP_MD_CTX_reset EVP_MD_CTX_cleanup diff --git a/src/lib/tls/session.c b/src/lib/tls/session.c index 2d2ea5263dc..93f2edf6313 100644 --- a/src/lib/tls/session.c +++ b/src/lib/tls/session.c @@ -1039,7 +1039,7 @@ int tls_session_pairs_from_x509_cert(fr_cursor_t *cursor, TALLOC_CTX *ctx, * Only add extensions for the actual client certificate */ if (attr_index == 0) { -#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER >= 0x10100000L ext_list = X509_get0_extensions(cert); #else ext_list = cert->cert_info->extensions; diff --git a/src/lib/tls/utils.c b/src/lib/tls/utils.c index 10a8b4f6bc1..4f3e185415a 100644 --- a/src/lib/tls/utils.c +++ b/src/lib/tls/utils.c @@ -85,7 +85,7 @@ int tls_utils_keyblock_size_get(REQUEST *request, SSL *ssl) { const EVP_CIPHER *c; const EVP_MD *h; -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER < 0x10100000L int md_size; if (ssl->enc_read_ctx == NULL || ssl->enc_read_ctx->cipher == NULL || ssl->read_hash == NULL) diff --git a/src/modules/rlm_eap/types/rlm_eap_fast/rlm_eap_fast.c b/src/modules/rlm_eap/types/rlm_eap_fast/rlm_eap_fast.c index dcf15fb8ad3..7de179a5575 100644 --- a/src/modules/rlm_eap/types/rlm_eap_fast/rlm_eap_fast.c +++ b/src/modules/rlm_eap/types/rlm_eap_fast/rlm_eap_fast.c @@ -273,7 +273,7 @@ static void eap_fast_session_ticket(tls_session_t *tls_session, const SSL *s, } // hostap:src/crypto/tls_openssl.c:tls_sess_sec_cb() -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER < 0x10100000L static int _session_secret(SSL *s, void *secret, int *secret_len, UNUSED STACK_OF(SSL_CIPHER) *peer_ciphers, UNUSED SSL_CIPHER **cipher, void *arg)