summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authormoparisthebest <admin@moparisthebest.com>2015-09-11 01:48:29 -0400
committermoparisthebest <admin@moparisthebest.com>2015-09-11 01:48:29 -0400
commitdbad9285b8a4267cc7e7e3c3fd84699ed406a13a (patch)
tree5a8e55c9e836674857b0045c3deb46443b39f68d /src
parent73636a00b5ef9786c76c6c62fc0c90f680cdc49d (diff)
TLS: Set SNI hostname before connect
Diffstat (limited to 'src')
-rw-r--r--src/common/server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/server.c b/src/common/server.c
index 62ba9540..8ff81553 100644
--- a/src/common/server.c
+++ b/src/common/server.c
@@ -487,6 +487,10 @@ ssl_do_connect (server * serv)
 	char buf[128];
 
 	g_sess = serv->server_session;
+
+	/* Set SNI hostname before connect */
+	SSL_set_tlsext_host_name(serv->ssl, serv->hostname);
+
 	if (SSL_connect (serv->ssl) <= 0)
 	{
 		char err_buf[128];