Patch Strict-SNI

This commit is contained in:
2019-04-03 20:46:05 +09:00
parent a791b0e99f
commit a592b83f05
+4
View File
@@ -912,6 +912,10 @@ ngx_http_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg)
} }
if (rc == NGX_DECLINED) { if (rc == NGX_DECLINED) {
// If SNI is not needed (1 server, etc.), do not apply.
if (hc->addr_conf->virtual_names == NULL) {
return SSL_TLSEXT_ERR_OK;
}
return (clcf->strict_sni) ? SSL_TLSEXT_ERR_ALERT_FATAL : SSL_TLSEXT_ERR_OK; return (clcf->strict_sni) ? SSL_TLSEXT_ERR_ALERT_FATAL : SSL_TLSEXT_ERR_OK;
} }