summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-04-09 18:17:40 (GMT)
committer Slávek Banko <slavek.banko@axis.cz>2017-04-09 18:17:40 (GMT)
commit45cf7d13eb68be0fd469fd49275c000a2c7bcc2f (patch)
tree898e969ab188b76f289d36edc4adc95ec7c43761
parentadb9d9d2b0bfbb0f856673e663aad7c4a63020eb (diff)
downloadtdelibs-45cf7d13.zip
tdelibs-45cf7d13.tar.gz
KSSL: Set hostname in TLSext to enable SNI support
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--tdeio/kssl/kssl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/tdeio/kssl/kssl.cc b/tdeio/kssl/kssl.cc
index e5f0921..0f34a55 100644
--- a/tdeio/kssl/kssl.cc
+++ b/tdeio/kssl/kssl.cc
@@ -329,6 +329,9 @@ int rc;
d->m_ssl = 0;
return rc;
}
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+ d->kossl->SSL_set_tlsext_host_name(d->m_ssl, d->proxyPeer.ascii());
+#endif
rc = d->kossl->SSL_accept(d->m_ssl);
if (rc == 1) {
@@ -424,6 +427,9 @@ int rc;
d->m_ssl = 0;
return rc;
}
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+ d->kossl->SSL_set_tlsext_host_name(d->m_ssl, d->proxyPeer.ascii());
+#endif
connect_again:
rc = d->kossl->SSL_connect(d->m_ssl);