ngx_http_core_loc_conf_t *clcf;
ngx_http_core_srv_conf_t *cscf;
- servername = SSL_get_servername(ssl_conn, TLSEXT_NAMETYPE_host_name);
-
- if (servername == NULL) {
- return SSL_TLSEXT_ERR_OK;
- }
-
c = ngx_ssl_get_connection(ssl_conn);
if (c->ssl->handshaked) {
return SSL_TLSEXT_ERR_ALERT_FATAL;
}
+ servername = SSL_get_servername(ssl_conn, TLSEXT_NAMETYPE_host_name);
+
+ if (servername == NULL) {
+ return SSL_TLSEXT_ERR_OK;
+ }
+
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
"SSL server name: \"%s\"", servername);