summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-09-06 18:49:02 +0200
committerJose <jose@zeroc.com>2019-09-06 18:52:30 +0200
commitf77a9b7847525d56ba64a0631652401885457a9e (patch)
treea3283476120c498a6e28bc0712d51886e64125e3 /cpp/src/IceSSL/OpenSSLTransceiverI.cpp
parentMark SNI support in UWP as not tested (diff)
downloadice-f77a9b7847525d56ba64a0631652401885457a9e.tar.bz2
ice-f77a9b7847525d56ba64a0631652401885457a9e.tar.xz
ice-f77a9b7847525d56ba64a0631652401885457a9e.zip
Enable SNI extension with CheckCertName > 1
- Remove IceSSL.ServerNameIndication, IceSSL.CheckCertName = 2 should be used instead. - Minor style fixes
Diffstat (limited to 'cpp/src/IceSSL/OpenSSLTransceiverI.cpp')
-rw-r--r--cpp/src/IceSSL/OpenSSLTransceiverI.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
index 8038b1159b5..a62d364e21f 100644
--- a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
+++ b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
@@ -188,14 +188,14 @@ OpenSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::
SSL_set_verify(_ssl, sslVerifyMode, IceSSL_opensslVerifyCallback);
}
- // Server name indication
- if (!_incoming && _engine->getServerNameIndication() && !_host.empty() && !IceInternal::isIpAddress(_host))
+ //
+ // Enable SNI
+ //
+ if(!_incoming && _engine->getServerNameIndication() && !_host.empty() && !IceInternal::isIpAddress(_host))
{
- if (!SSL_set_tlsext_host_name(_ssl, _host.c_str()))
+ if(!SSL_set_tlsext_host_name(_ssl, _host.c_str()))
{
- ostringstream ostr;
- ostr << "IceSSL: failed to set SNI host " << _host << " with SSL_set_tlsext_host_name";
- throw SecurityException(__FILE__, __LINE__, ostr.str());
+ throw SecurityException(__FILE__, __LINE__, "IceSSL: setting SNI host failed `" + _host + "'");
}
}
}