summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_ssl_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-05-29 15:21:09 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-05-29 15:21:09 +0000
commite60303cdcaddf120a81ddb2a3a921f553af75705 (patch)
tree676dd8dc90f177caa928fbfe0e081c17ddb3a166 /src/http/modules/ngx_http_ssl_module.c
parentf44ea0bbf61c9dac9221ccde9492f28004ef4e25 (diff)
downloadnginx-e60303cdcaddf120a81ddb2a3a921f553af75705.tar.gz
nginx-e60303cdcaddf120a81ddb2a3a921f553af75705.tar.bz2
SNI support
Diffstat (limited to 'src/http/modules/ngx_http_ssl_module.c')
-rw-r--r--src/http/modules/ngx_http_ssl_module.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c
index e77e767ec..7376d1028 100644
--- a/src/http/modules/ngx_http_ssl_module.c
+++ b/src/http/modules/ngx_http_ssl_module.c
@@ -345,6 +345,19 @@ ngx_http_ssl_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
return NGX_CONF_ERROR;
}
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+
+ if (SSL_CTX_set_tlsext_servername_callback(conf->ssl.ctx,
+ ngx_http_ssl_servername)
+ == 0)
+ {
+ ngx_ssl_error(NGX_LOG_EMERG, cf->log, 0,
+ "SSL_CTX_set_tlsext_servername_callback() failed");
+ return NGX_CONF_ERROR;
+ }
+
+#endif
+
cln = ngx_pool_cleanup_add(cf->pool, 0);
if (cln == NULL) {
return NGX_CONF_ERROR;