Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit dbad928

Browse files
TLS: Set SNI hostname before connect
1 parent 73636a0 commit dbad928

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/common/server.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,10 @@ ssl_do_connect (server * serv)
487487
char buf[128];
488488

489489
g_sess = serv->server_session;
490+
491+
/* Set SNI hostname before connect */
492+
SSL_set_tlsext_host_name(serv->ssl, serv->hostname);
493+
490494
if (SSL_connect (serv->ssl) <= 0)
491495
{
492496
char err_buf[128];

0 commit comments

Comments
 (0)