]> git.feebdaed.xyz Git - 0xmirror/nginx.git/commitdiff
SSL: reasonable version for LibreSSL adjusted.
authorSergey Kandaurov <pluknet@nginx.com>
Mon, 25 Dec 2023 17:15:48 +0000 (21:15 +0400)
committerSergey Kandaurov <pluknet@nginx.com>
Mon, 25 Dec 2023 17:15:48 +0000 (21:15 +0400)
OPENSSL_VERSION_NUMBER is now redefined to 0x1010000fL for LibreSSL 3.5.0
and above.  Building with older LibreSSL versions, such as 2.8.0, may now
produce warnings (see cab37803ebb3) and may require appropriate compiler
options to suppress them.

Notably, this allows to start using SSL_get0_verified_chain() appeared
in OpenSSL 1.1.0 and LibreSSL 3.5.0, without additional macro tests.

Prodded by Ilya Shipitsin.

src/event/ngx_event_openssl.h
src/event/ngx_event_openssl_stapling.c

index c062f912c24ba52eb1b0a41210a9a402c487b5c3..ebb2c35bf287974fa1808cb1197277b5e203c5a0 100644 (file)
@@ -45,7 +45,7 @@
 
 #if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L)
 #undef OPENSSL_VERSION_NUMBER
-#if (LIBRESSL_VERSION_NUMBER >= 0x2080000fL)
+#if (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
 #define OPENSSL_VERSION_NUMBER  0x1010000fL
 #else
 #define OPENSSL_VERSION_NUMBER  0x1000107fL
index e3fa8c4e2be18f96910b9f5dfdce6ef3a8a70726..e9bb8354eeed24d2330f0bde806a3bfe2c115f12 100644 (file)
@@ -893,7 +893,7 @@ ngx_ssl_ocsp_validate(ngx_connection_t *c)
     ocsp->cert_status = V_OCSP_CERTSTATUS_GOOD;
     ocsp->conf = ocf;
 
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
 
     ocsp->certs = SSL_get0_verified_chain(c->ssl->connection);