summaryrefslogtreecommitdiffhomepage
path: root/src/event
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2019-03-03 16:48:06 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2019-03-03 16:48:06 +0300
commit99d7bb690924e60e9e03096ac5e507111f7c182d (patch)
treefdd6cce0976c6367af48736fa8a05e656bc45418 /src/event
parentfd97b2a80f678b9bf372d9a6537e5d4db51188ae (diff)
downloadnginx-99d7bb690924e60e9e03096ac5e507111f7c182d.tar.gz
nginx-99d7bb690924e60e9e03096ac5e507111f7c182d.tar.bz2
SSL: server name callback changed to return fatal errors.
Notably this affects various allocation errors, and should generally improve things if an allocation error actually happens during a callback. Depending on the OpenSSL version, returning an error can result in either SSL_R_CALLBACK_FAILED or SSL_R_CLIENTHELLO_TLSEXT error from SSL_do_handshake(), so both errors were switched to the "info" level.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/ngx_event_openssl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index e18778e2a..e18480c0d 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -2855,9 +2855,15 @@ ngx_ssl_connection_error(ngx_connection_t *c, int sslerr, ngx_err_t err,
|| n == SSL_R_NO_COMPRESSION_SPECIFIED /* 187 */
|| n == SSL_R_NO_SHARED_CIPHER /* 193 */
|| n == SSL_R_RECORD_LENGTH_MISMATCH /* 213 */
+#ifdef SSL_R_CLIENTHELLO_TLSEXT
+ || n == SSL_R_CLIENTHELLO_TLSEXT /* 226 */
+#endif
#ifdef SSL_R_PARSE_TLSEXT
|| n == SSL_R_PARSE_TLSEXT /* 227 */
#endif
+#ifdef SSL_R_CALLBACK_FAILED
+ || n == SSL_R_CALLBACK_FAILED /* 234 */
+#endif
|| n == SSL_R_UNEXPECTED_MESSAGE /* 244 */
|| n == SSL_R_UNEXPECTED_RECORD /* 245 */
|| n == SSL_R_UNKNOWN_ALERT_TYPE /* 246 */