Mercurial > hg > nginx
changeset 1876:5d663752fd96
low SSL handshake errors level
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 01 Feb 2008 14:05:18 +0000 |
parents | c11d96cbad75 |
children | a55876dff8f5 |
files | src/event/ngx_event_openssl.c |
diffstat | 1 files changed, 29 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/ngx_event_openssl.c Thu Jan 31 15:36:33 2008 +0000 +++ b/src/event/ngx_event_openssl.c Fri Feb 01 14:05:18 2008 +0000 @@ -1115,6 +1115,7 @@ 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; @@ -1148,6 +1149,34 @@ 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; + break; + + case NGX_ERROR_ERR: + level = NGX_LOG_ERR; + break; + + default: + break; + } + } } ngx_ssl_error(level, c->log, err, text);