mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 01:12:40 +08:00
low SSL handshake errors level
This commit is contained in:
parent
c463ece9d7
commit
b1d4a6cc80
@ -1115,6 +1115,7 @@ static void
|
||||
ngx_ssl_connection_error(ngx_connection_t *c, int sslerr, ngx_err_t err,
|
||||
char *text)
|
||||
{
|
||||
int n;
|
||||
ngx_uint_t level;
|
||||
|
||||
level = NGX_LOG_CRIT;
|
||||
@ -1135,6 +1136,34 @@ ngx_ssl_connection_error(ngx_connection_t *c, int sslerr, ngx_err_t err,
|
||||
{
|
||||
switch (c->log_error) {
|
||||
|
||||
case NGX_ERROR_IGNORE_ECONNRESET:
|
||||
case NGX_ERROR_INFO:
|
||||
level = NGX_LOG_INFO;
|
||||
break;
|
||||
|
||||
case NGX_ERROR_ERR:
|
||||
level = NGX_LOG_ERR;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (sslerr == SSL_ERROR_SSL) {
|
||||
|
||||
n = ERR_GET_REASON(ERR_peek_error());
|
||||
|
||||
/* handshake failures */
|
||||
if (n == SSL_R_NO_SHARED_CIPHER
|
||||
|| n == SSL_R_UNEXPECTED_MESSAGE
|
||||
|| n == SSL_R_WRONG_VERSION_NUMBER
|
||||
|| n == SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED
|
||||
|| n == SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER
|
||||
|| n == SSL_R_TLSV1_ALERT_UNKNOWN_CA)
|
||||
{
|
||||
switch (c->log_error) {
|
||||
|
||||
case NGX_ERROR_IGNORE_ECONNRESET:
|
||||
case NGX_ERROR_INFO:
|
||||
level = NGX_LOG_INFO;
|
||||
|
Loading…
Reference in New Issue
Block a user