comparison src/event/ngx_event_openssl.c @ 646:615b5ea36fc0 NGINX_1_1_7

nginx 1.1.7 *) Feature: support of several resolvers in the "resolver" directive. Thanks to Kirill A. Korinskiy. *) Bugfix: a segmentation fault occurred on start or while reconfiguration if the "ssl" directive was used at http level and there was no "ssl_certificate" defined. *) Bugfix: reduced memory consumption while proxying of big files if they were buffered to disk. *) Bugfix: a segmentation fault might occur in a worker process if "proxy_http_version 1.1" directive was used. *) Bugfix: in the "expires @time" directive.
author Igor Sysoev <http://sysoev.ru>
date Mon, 31 Oct 2011 00:00:00 +0400
parents 6f21ae02fb01
children 5a4401b9551b
comparison
equal deleted inserted replaced
645:e461dead01e9 646:615b5ea36fc0
861 * renegotiation gracefully, so drop connection here 861 * renegotiation gracefully, so drop connection here
862 */ 862 */
863 863
864 ngx_log_error(NGX_LOG_NOTICE, c->log, 0, "SSL renegotiation disabled"); 864 ngx_log_error(NGX_LOG_NOTICE, c->log, 0, "SSL renegotiation disabled");
865 865
866 while (ERR_peek_error()) {
867 ngx_ssl_error(NGX_LOG_DEBUG, c->log, 0,
868 "ignoring stale global SSL error");
869 }
870
871 ERR_clear_error();
872
866 c->ssl->no_wait_shutdown = 1; 873 c->ssl->no_wait_shutdown = 1;
867 c->ssl->no_send_shutdown = 1; 874 c->ssl->no_send_shutdown = 1;
868 875
869 return NGX_ERROR; 876 return NGX_ERROR;
870 } 877 }
1350 } else if (sslerr == SSL_ERROR_SSL) { 1357 } else if (sslerr == SSL_ERROR_SSL) {
1351 1358
1352 n = ERR_GET_REASON(ERR_peek_error()); 1359 n = ERR_GET_REASON(ERR_peek_error());
1353 1360
1354 /* handshake failures */ 1361 /* handshake failures */
1355 if (n == SSL_R_BLOCK_CIPHER_PAD_IS_WRONG /* 129 */ 1362 if (n == SSL_R_BAD_CHANGE_CIPHER_SPEC /* 103 */
1363 || n == SSL_R_BLOCK_CIPHER_PAD_IS_WRONG /* 129 */
1356 || n == SSL_R_DIGEST_CHECK_FAILED /* 149 */ 1364 || n == SSL_R_DIGEST_CHECK_FAILED /* 149 */
1365 || n == SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST /* 151 */
1366 || n == SSL_R_EXCESSIVE_MESSAGE_SIZE /* 152 */
1357 || n == SSL_R_LENGTH_MISMATCH /* 159 */ 1367 || n == SSL_R_LENGTH_MISMATCH /* 159 */
1358 || n == SSL_R_NO_CIPHERS_PASSED /* 182 */ 1368 || n == SSL_R_NO_CIPHERS_PASSED /* 182 */
1359 || n == SSL_R_NO_CIPHERS_SPECIFIED /* 183 */ 1369 || n == SSL_R_NO_CIPHERS_SPECIFIED /* 183 */
1370 || n == SSL_R_NO_COMPRESSION_SPECIFIED /* 187 */
1360 || n == SSL_R_NO_SHARED_CIPHER /* 193 */ 1371 || n == SSL_R_NO_SHARED_CIPHER /* 193 */
1361 || n == SSL_R_RECORD_LENGTH_MISMATCH /* 213 */ 1372 || n == SSL_R_RECORD_LENGTH_MISMATCH /* 213 */
1373 #ifdef SSL_R_PARSE_TLSEXT
1374 || n == SSL_R_PARSE_TLSEXT /* 227 */
1375 #endif
1362 || n == SSL_R_UNEXPECTED_MESSAGE /* 244 */ 1376 || n == SSL_R_UNEXPECTED_MESSAGE /* 244 */
1363 || n == SSL_R_UNEXPECTED_RECORD /* 245 */ 1377 || n == SSL_R_UNEXPECTED_RECORD /* 245 */
1364 || n == SSL_R_UNKNOWN_ALERT_TYPE /* 246 */ 1378 || n == SSL_R_UNKNOWN_ALERT_TYPE /* 246 */
1365 || n == SSL_R_UNKNOWN_PROTOCOL /* 252 */ 1379 || n == SSL_R_UNKNOWN_PROTOCOL /* 252 */
1366 || n == SSL_R_WRONG_VERSION_NUMBER /* 267 */ 1380 || n == SSL_R_WRONG_VERSION_NUMBER /* 267 */
1367 || n == SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC /* 281 */ 1381 || n == SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC /* 281 */
1382 #ifdef SSL_R_RENEGOTIATE_EXT_TOO_LONG
1383 || n == SSL_R_RENEGOTIATE_EXT_TOO_LONG /* 335 */
1384 || n == SSL_R_RENEGOTIATION_ENCODING_ERR /* 336 */
1385 || n == SSL_R_RENEGOTIATION_MISMATCH /* 337 */
1386 #endif
1387 #ifdef SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED
1388 || n == SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED /* 338 */
1389 #endif
1390 #ifdef SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING
1391 || n == SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING /* 345 */
1392 #endif
1368 || n == 1000 /* SSL_R_SSLV3_ALERT_CLOSE_NOTIFY */ 1393 || n == 1000 /* SSL_R_SSLV3_ALERT_CLOSE_NOTIFY */
1369 || n == SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE /* 1010 */ 1394 || n == SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE /* 1010 */
1370 || n == SSL_R_SSLV3_ALERT_BAD_RECORD_MAC /* 1020 */ 1395 || n == SSL_R_SSLV3_ALERT_BAD_RECORD_MAC /* 1020 */
1371 || n == SSL_R_TLSV1_ALERT_DECRYPTION_FAILED /* 1021 */ 1396 || n == SSL_R_TLSV1_ALERT_DECRYPTION_FAILED /* 1021 */
1372 || n == SSL_R_TLSV1_ALERT_RECORD_OVERFLOW /* 1022 */ 1397 || n == SSL_R_TLSV1_ALERT_RECORD_OVERFLOW /* 1022 */