]> git.kaiwu.me - nginx.git/commitdiff
QUIC: logging of SSL library errors.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 21 May 2025 15:55:31 +0000 (19:55 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Fri, 23 May 2025 11:00:47 +0000 (15:00 +0400)
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.

src/event/quic/ngx_event_quic_ssl.c

index ddc6c7c3bf9875f7c6c2fd3774c786c9d539c543..4f7060ce47840e26ef00284eed2522730152942a 100644 (file)
@@ -402,7 +402,7 @@ ngx_quic_crypto_input(ngx_connection_t *c, ngx_chain_t *data,
         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 @@ ngx_quic_init_connection(ngx_connection_t *c)
     }
 
     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 @@ ngx_quic_init_connection(ngx_connection_t *c)
 #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;
     }