Browse Source

KSSL: Set hostname in TLSext to enable SNI support

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 2 years ago
parent
commit
45cf7d13eb
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      tdeio/kssl/kssl.cc

+ 6
- 0
tdeio/kssl/kssl.cc View File

@@ -329,6 +329,9 @@ int rc;
329 329
 		d->m_ssl = 0;
330 330
 		return rc;
331 331
 	}
332
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
333
+	d->kossl->SSL_set_tlsext_host_name(d->m_ssl, d->proxyPeer.ascii());
334
+#endif
332 335
 
333 336
 	rc = d->kossl->SSL_accept(d->m_ssl);
334 337
 	if (rc == 1) {
@@ -424,6 +427,9 @@ int rc;
424 427
 		d->m_ssl = 0;
425 428
 		return rc;
426 429
 	}
430
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
431
+	d->kossl->SSL_set_tlsext_host_name(d->m_ssl, d->proxyPeer.ascii());
432
+#endif
427 433
 
428 434
 connect_again:
429 435
 	rc = d->kossl->SSL_connect(d->m_ssl);

Loading…
Cancel
Save