Klaus Demo nginx / b1d4a6c
low SSL handshake errors level Igor Sysoev 14 years ago
1 changed file(s) with 29 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
11141114 ngx_ssl_connection_error(ngx_connection_t *c, int sslerr, ngx_err_t err,
11151115 char *text)
11161116 {
1117 int n;
11171118 ngx_uint_t level;
11181119
11191120 level = NGX_LOG_CRIT;
11311132 || err == NGX_ENETUNREACH
11321133 || err == NGX_EHOSTDOWN
11331134 || err == NGX_EHOSTUNREACH)
1135 {
1136 switch (c->log_error) {
1137
1138 case NGX_ERROR_IGNORE_ECONNRESET:
1139 case NGX_ERROR_INFO:
1140 level = NGX_LOG_INFO;
1141 break;
1142
1143 case NGX_ERROR_ERR:
1144 level = NGX_LOG_ERR;
1145 break;
1146
1147 default:
1148 break;
1149 }
1150 }
1151
1152 } else if (sslerr == SSL_ERROR_SSL) {
1153
1154 n = ERR_GET_REASON(ERR_peek_error());
1155
1156 /* handshake failures */
1157 if (n == SSL_R_NO_SHARED_CIPHER
1158 || n == SSL_R_UNEXPECTED_MESSAGE
1159 || n == SSL_R_WRONG_VERSION_NUMBER
1160 || n == SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED
1161 || n == SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER
1162 || n == SSL_R_TLSV1_ALERT_UNKNOWN_CA)
11341163 {
11351164 switch (c->log_error) {
11361165