diff options
author | Jose <jose@zeroc.com> | 2019-09-06 18:49:02 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-09-06 18:52:30 +0200 |
commit | f77a9b7847525d56ba64a0631652401885457a9e (patch) | |
tree | a3283476120c498a6e28bc0712d51886e64125e3 /cpp/src/IceSSL/OpenSSLTransceiverI.cpp | |
parent | Mark SNI support in UWP as not tested (diff) | |
download | ice-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.cpp | 12 |
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 + "'"); } } } |