From: Aleksei Bavshin Date: Tue, 7 Apr 2026 16:26:40 +0000 (-0700) Subject: SSL: compatibility with renamed error codes in OpenSSL 4.0. X-Git-Tag: release-1.30.6~37 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=f97f7ed89acaa6e0ca6e796545d865a6323e6ab6;p=nginx.git SSL: compatibility with renamed error codes in OpenSSL 4.0. SSL_R_SSL3_SESSION_ID_TOO_LONG is no longer available when building OpenSSL 4.0 with no-deprecated. Added the new name as a fallback. --- diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index 74b2b0066..f04a462bf 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -3960,6 +3960,8 @@ ngx_ssl_connection_error(ngx_connection_t *c, int sslerr, ngx_err_t err, #endif #ifdef SSL_R_SSL3_SESSION_ID_TOO_LONG || n == SSL_R_SSL3_SESSION_ID_TOO_LONG /* 300 */ +#elif (defined SSL_R_TLS_SESSION_ID_TOO_LONG) + || n == SSL_R_TLS_SESSION_ID_TOO_LONG /* 300 */ #endif #ifdef SSL_R_BAD_ECPOINT || n == SSL_R_BAD_ECPOINT /* 306 */