From bf9c73acd9b223f537b4ec60ccec6554f6bca7cf Mon Sep 17 00:00:00 2001 From: Hakase Date: Wed, 6 Mar 2019 08:44:16 +0900 Subject: [PATCH] Latest update - 7475 --- src/http/ngx_http_request.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index dd3c11b..eb68bfe 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -870,17 +870,17 @@ ngx_http_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg) clcf = ngx_http_get_module_loc_conf(hc->conf_ctx, ngx_http_core_module); + if (c->ssl->handshaked) { + *ad = SSL_AD_NO_RENEGOTIATION; + return SSL_TLSEXT_ERR_ALERT_FATAL; + } + servername = SSL_get_servername(ssl_conn, TLSEXT_NAMETYPE_host_name); if (servername == NULL) { return (clcf->strict_sni) ? SSL_TLSEXT_ERR_ALERT_FATAL : SSL_TLSEXT_ERR_OK; } - if (c->ssl->handshaked) { - *ad = SSL_AD_NO_RENEGOTIATION; - return SSL_TLSEXT_ERR_ALERT_FATAL; - } - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, "SSL server name: \"%s\"", servername);