aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2025-07-08 18:07:04 +0400
committerpluknet <pluknet@nginx.com>2025-07-10 19:00:45 +0400
commita5ca38f30392e93aadc32cf5955c29fddcaa3871 (patch)
treedfc89a0f7f6a7de40c99b42b4c879e5703de85e8 /src
parenta5d60c30d3d494291dd7e2ddde4536a439bab5bf (diff)
downloadnginx-a5ca38f30392e93aadc32cf5955c29fddcaa3871.tar.gz
nginx-a5ca38f30392e93aadc32cf5955c29fddcaa3871.zip
SSL: fixed testing OPENSSL_VERSION_NUMBER for OpenSSL 3.0+.
Prior to OpenSSL 3.0, OPENSSL_VERSION_NUMBER used the following format: MNNFFPPS: major minor fix patch status Where the status nibble (S) has 0+ for development and f for release. The format was changed in OpenSSL 3.0.0, where it is always zero: MNN00PP0: major minor patch
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_openssl.c2
-rw-r--r--src/event/ngx_event_openssl.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index fc7f26655..ff604c562 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -1374,7 +1374,7 @@ ngx_ssl_dhparam(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *file)
if (SSL_CTX_set0_tmp_dh_pkey(ssl->ctx, dh) != 1) {
ngx_ssl_error(NGX_LOG_EMERG, ssl->log, 0,
"SSL_CTX_set0_tmp_dh_pkey(\"%s\") failed", file->data);
-#if (OPENSSL_VERSION_NUMBER >= 0x3000001fL)
+#if (OPENSSL_VERSION_NUMBER >= 0x30000010L)
EVP_PKEY_free(dh);
#endif
BIO_free(bio);
diff --git a/src/event/ngx_event_openssl.h b/src/event/ngx_event_openssl.h
index 61ce16dab..0c9e9e840 100644
--- a/src/event/ngx_event_openssl.h
+++ b/src/event/ngx_event_openssl.h
@@ -96,7 +96,7 @@
#endif
-#if (OPENSSL_VERSION_NUMBER < 0x3000000fL)
+#if (OPENSSL_VERSION_NUMBER < 0x30000000L)
#define SSL_group_to_name(s, nid) NULL
#endif