changeset 9405:b6668b7ba8e6

QUIC: logging of SSL library errors. Logging level for such errors, which should not normally happen, is changed to NGX_LOG_ALERT, and ngx_log_error() is replaced with ngx_ssl_error() for consistency with the rest of the code.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 21 May 2025 19:55:31 +0400
parents bc8c07956f34
children 928f63626afe
files src/event/quic/ngx_event_quic_ssl.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_ssl.c	Tue May 06 15:09:28 2025 +0400
+++ b/src/event/quic/ngx_event_quic_ssl.c	Wed May 21 19:55:31 2025 +0400
@@ -402,7 +402,7 @@
         b = cl->buf;
 
         if (!SSL_provide_quic_data(ssl_conn, level, b->pos, b->last - b->pos)) {
-            ngx_ssl_error(NGX_LOG_INFO, c->log, 0,
+            ngx_ssl_error(NGX_LOG_ALERT, c->log, 0,
                           "SSL_provide_quic_data() failed");
             return NGX_ERROR;
         }
@@ -531,7 +531,7 @@
     }
 
     if (SSL_set_quic_method(ssl_conn, &quic_method) == 0) {
-        ngx_log_error(NGX_LOG_INFO, c->log, 0,
+        ngx_ssl_error(NGX_LOG_ALERT, c->log, 0,
                       "quic SSL_set_quic_method() failed");
         return NGX_ERROR;
     }
@@ -572,14 +572,14 @@
 #endif
 
     if (SSL_set_quic_transport_params(ssl_conn, p, len) == 0) {
-        ngx_log_error(NGX_LOG_INFO, c->log, 0,
+        ngx_ssl_error(NGX_LOG_ALERT, c->log, 0,
                       "quic SSL_set_quic_transport_params() failed");
         return NGX_ERROR;
     }
 
 #ifdef OPENSSL_IS_BORINGSSL
     if (SSL_set_quic_early_data_context(ssl_conn, p, clen) == 0) {
-        ngx_log_error(NGX_LOG_INFO, c->log, 0,
+        ngx_ssl_error(NGX_LOG_ALERT, c->log, 0,
                       "quic SSL_set_quic_early_data_context() failed");
         return NGX_ERROR;
     }