Skip to content

Commit

Permalink
Freeradius fails to build on systems with LibreSSL.
Browse files Browse the repository at this point in the history
FreeRadius try to link against function X509_get0_extensions() that does
not exist on LibreSSl, so the following "if" clausure does not work
correct for LibreSSL, since OpenSSL has a defined macro
OPENSSL_VERSION_NUMBER for LibreSSL bigger than
0x10100000, and does not have X509_get0_extensions():

 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
                ext_list = X509_get0_extensions(client_cert);

This patch guarantee that this check is not valid for LibreSSL, thus,
using the fall back.
  • Loading branch information
brenoleitao committed Mar 30, 2017
1 parent ba385f0 commit ff0f0d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/tls/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ do { \
* Only add extensions for the actual client certificate
*/
if (attr_index == 0) {
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
ext_list = X509_get0_extensions(cert);
#else
ext_list = cert->cert_info->extensions;
Expand Down

0 comments on commit ff0f0d3

Please sign in to comment.