Mercurial > nginx
changeset 9431:b18e6a6bb729
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
| author | Sergey Kandaurov <pluknet@nginx.com> |
|---|---|
| date | Tue, 08 Jul 2025 18:07:04 +0400 |
| parents | 644e6351d996 |
| children | b7dd813a5a6f |
| files | src/event/ngx_event_openssl.c src/event/ngx_event_openssl.h |
| diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/ngx_event_openssl.c Tue Jul 08 17:59:50 2025 +0400 +++ b/src/event/ngx_event_openssl.c Tue Jul 08 18:07:04 2025 +0400 @@ -1374,7 +1374,7 @@ 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);
