From e60303cdcaddf120a81ddb2a3a921f553af75705 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 29 May 2007 15:21:09 +0000 Subject: SNI support --- src/http/modules/ngx_http_ssl_module.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/http/modules') 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; -- cgit