]> git.kaiwu.me - nginx.git/commitdiff
SSL: compatibility with renamed error codes in OpenSSL 4.0.
authorAleksei Bavshin <a.bavshin@nginx.com>
Tue, 7 Apr 2026 16:26:40 +0000 (09:26 -0700)
committerAleksei Bavshin <a.bavshin@f5.com>
Tue, 14 Apr 2026 17:26:42 +0000 (11:26 -0600)
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.

src/event/ngx_event_openssl.c

index 74b2b0066ea81620e5881896418d15e7c767af10..f04a462bf0195d0f3ca8b0194e95713fbce76b13 100644 (file)
@@ -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 */