commit 53289f71c53f3aa8047b34d6db9b0ca2ac35f4cb Author: Cédric Krier Date: Wed Jun 7 11:29:13 2017 +0200 Fix OpenSSL version check for LibreSSL diff --git a/plugins_tools/eid-viewer/certhelpers.c b/plugins_tools/eid-viewer/certhelpers.c index de9f8bf4..1e3d1ee1 100644 --- a/plugins_tools/eid-viewer/certhelpers.c +++ b/plugins_tools/eid-viewer/certhelpers.c @@ -12,7 +12,7 @@ #include "backend.h" -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) #define X509_get0_extensions(ce) ((ce)->cert_info->extensions) #define ASN1_STRING_get0_data ASN1_STRING_data #endif diff --git a/plugins_tools/eid-viewer/verify.c b/plugins_tools/eid-viewer/verify.c index 04016a44..f144d2cb 100644 --- a/plugins_tools/eid-viewer/verify.c +++ b/plugins_tools/eid-viewer/verify.c @@ -22,7 +22,7 @@ #endif // All valid OCSP URLs should have the following as their prefix: -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) #define X509_get0_extensions(ce) ((ce)->cert_info->extensions) #define X509_get0_tbs_sigalg(ci) ((ci)->sig_alg) diff --git a/tests/unit/sign.c b/tests/unit/sign.c index 31a1ab7a..0e0e3011 100644 --- a/tests/unit/sign.c +++ b/tests/unit/sign.c @@ -37,7 +37,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) static int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) { if(!r || !n || !e) { return 0;