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.
This commit is contained in:
Sergey Kandaurov 2025-05-21 19:55:31 +04:00 committed by Roman Arutyunyan
parent ef9cd3214f
commit 47f96993f6

View File

@ -402,7 +402,7 @@ ngx_quic_crypto_input(ngx_connection_t *c, ngx_chain_t *data,
b = cl->buf; b = cl->buf;
if (!SSL_provide_quic_data(ssl_conn, level, b->pos, b->last - b->pos)) { 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"); "SSL_provide_quic_data() failed");
return NGX_ERROR; 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) { 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"); "quic SSL_set_quic_method() failed");
return NGX_ERROR; return NGX_ERROR;
} }
@ -572,14 +572,14 @@ ngx_quic_init_connection(ngx_connection_t *c)
#endif #endif
if (SSL_set_quic_transport_params(ssl_conn, p, len) == 0) { 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"); "quic SSL_set_quic_transport_params() failed");
return NGX_ERROR; return NGX_ERROR;
} }
#ifdef OPENSSL_IS_BORINGSSL #ifdef OPENSSL_IS_BORINGSSL
if (SSL_set_quic_early_data_context(ssl_conn, p, clen) == 0) { 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"); "quic SSL_set_quic_early_data_context() failed");
return NGX_ERROR; return NGX_ERROR;
} }