summaryrefslogtreecommitdiffstats
path: root/tdeio
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-04-09 20:17:40 +0200
committerSlávek Banko <slavek.banko@axis.cz>2017-04-09 20:17:50 +0200
commitf23de663bb04fd7af4e9d83e65c95d373f9e0794 (patch)
tree6e979b0e80737123c1943f3052177bee472c6595 /tdeio
parentf83e4b47411a1b55c3f9e38957e63a9238afdb2e (diff)
downloadtdelibs-f23de663bb04fd7af4e9d83e65c95d373f9e0794.tar.gz
tdelibs-f23de663bb04fd7af4e9d83e65c95d373f9e0794.zip
KSSL: Set hostname in TLSext to enable SNI support
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 45cf7d13eb68be0fd469fd49275c000a2c7bcc2f)
Diffstat (limited to 'tdeio')
-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 e5f092157..0f34a55da 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);