diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2022-05-11 19:42:17 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2022-05-11 19:42:37 +0100 |
commit | 24b8ed847ac646f0d7e5b9fbe03a959719cd053b (patch) | |
tree | 598801cb553c4f25f97d7c3675850b6c17f03387 /src | |
parent | c0418936da7c7ec6674e6d60dac5fa33a84e0618 (diff) |
Revert "LibreSSL: maintain buildability on versions after 3.5.0"
Breaks Solaris builds.
This reverts commit c0418936da7c7ec6674e6d60dac5fa33a84e0618.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/dane-openssl.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/src/dane-openssl.c b/src/src/dane-openssl.c index af7497a93..6ed352929 100644 --- a/src/src/dane-openssl.c +++ b/src/src/dane-openssl.c @@ -22,7 +22,7 @@ # error "OpenSSL 1.0.0 or higher required" #endif -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) # define X509_up_ref(x) CRYPTO_add(&((x)->references), 1, CRYPTO_LOCK_X509) #endif @@ -30,32 +30,28 @@ #ifdef LIBRESSL_VERSION_NUMBER # if LIBRESSL_VERSION_NUMBER >= 0x2090000fL # define EXIM_HAVE_ASN1_MACROS -# define EXIM_OPAQUE_X509 # endif #endif /* OpenSSL */ #if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) # define EXIM_HAVE_ASN1_MACROS # define EXIM_OPAQUE_X509 -#else /* Older OpenSSL and all LibreSSL */ -# if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050000fL -/* LibreSSL before 3.5.0 */ -# define X509_STORE_CTX_get_verify(ctx) (ctx)->verify -# define X509_STORE_CTX_get_verify_cb(ctx) (ctx)->verify_cb -# define X509_STORE_CTX_get0_cert(ctx) (ctx)->cert -# define X509_STORE_CTX_get0_chain(ctx) (ctx)->chain -# define X509_STORE_CTX_get0_untrusted(ctx) (ctx)->untrusted - -# define X509_STORE_CTX_set_verify(ctx, verify_chain) (ctx)->verify = (verify_chain) -# define X509_STORE_CTX_set0_verified_chain(ctx, sk) (ctx)->chain = (sk) -# define X509_STORE_CTX_set_error_depth(ctx, val) (ctx)->error_depth = (val) -# define X509_STORE_CTX_set_current_cert(ctx, cert) (ctx)->current_cert = (cert) - -# define ASN1_STRING_get0_data ASN1_STRING_data -# define X509_getm_notBefore X509_get_notBefore -# define X509_getm_notAfter X509_get_notAfter -# endif /* LibreSSL < 3.5.0 */ +#else +# define X509_STORE_CTX_get_verify(ctx) (ctx)->verify +# define X509_STORE_CTX_get_verify_cb(ctx) (ctx)->verify_cb +# define X509_STORE_CTX_get0_cert(ctx) (ctx)->cert +# define X509_STORE_CTX_get0_chain(ctx) (ctx)->chain +# define X509_STORE_CTX_get0_untrusted(ctx) (ctx)->untrusted + +# define X509_STORE_CTX_set_verify(ctx, verify_chain) (ctx)->verify = (verify_chain) +# define X509_STORE_CTX_set0_verified_chain(ctx, sk) (ctx)->chain = (sk) +# define X509_STORE_CTX_set_error_depth(ctx, val) (ctx)->error_depth = (val) +# define X509_STORE_CTX_set_current_cert(ctx, cert) (ctx)->current_cert = (cert) + +# define ASN1_STRING_get0_data ASN1_STRING_data +# define X509_getm_notBefore X509_get_notBefore +# define X509_getm_notAfter X509_get_notAfter # define CRYPTO_ONCE_STATIC_INIT 0 # define CRYPTO_THREAD_run_once run_once |