summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceSSL/OpenSSLTransceiverI.cpp')
-rw-r--r--cpp/src/IceSSL/OpenSSLTransceiverI.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
index 7503cc8c9a8..99248a74a2d 100644
--- a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
+++ b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp
@@ -83,7 +83,7 @@ IceSSL::TransceiverI::getNativeInfo()
}
IceInternal::SocketOperation
-IceSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::Buffer& writeBuffer, bool&)
+IceSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::Buffer& writeBuffer)
{
IceInternal::SocketOperation status = _stream->connect(readBuffer, writeBuffer);
if(status != IceInternal::SocketOperationNone)
@@ -279,7 +279,11 @@ IceSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::B
_verified = true;
}
+#ifdef ICE_CPP11_MAPPING
+ _engine->verifyPeer(_stream->fd(), _host, dynamic_pointer_cast<NativeConnectionInfo>(getInfo()));
+#else
_engine->verifyPeer(_stream->fd(), _host, NativeConnectionInfoPtr::dynamicCast(getInfo()));
+#endif
if(_engine->securityTraceLevel() >= 1)
{
@@ -308,7 +312,11 @@ IceSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::B
}
IceInternal::SocketOperation
+#ifdef ICE_CPP11_MAPPING
+IceSSL::TransceiverI::closing(bool initiator, exception_ptr)
+#else
IceSSL::TransceiverI::closing(bool initiator, const Ice::LocalException&)
+#endif
{
// If we are initiating the connection closure, wait for the peer
// to close the TCP/IP connection. Otherwise, close immediately.
@@ -440,7 +448,7 @@ IceSSL::TransceiverI::write(IceInternal::Buffer& buf)
}
IceInternal::SocketOperation
-IceSSL::TransceiverI::read(IceInternal::Buffer& buf, bool&)
+IceSSL::TransceiverI::read(IceInternal::Buffer& buf)
{
if(!_stream->isConnected())
{
@@ -448,8 +456,7 @@ IceSSL::TransceiverI::read(IceInternal::Buffer& buf, bool&)
}
//
- // Note: we don't set the hasMoreData flag in this implementation.
- // We assume that OpenSSL doesn't read more SSL records than
+ // Note: We assume that OpenSSL doesn't read more SSL records than
// necessary to fill the requested data and that the sender sends
// Ice messages in individual SSL records.
//
@@ -572,7 +579,7 @@ IceSSL::TransceiverI::toDetailedString() const
Ice::ConnectionInfoPtr
IceSSL::TransceiverI::getInfo() const
{
- NativeConnectionInfoPtr info = new NativeConnectionInfo();
+ NativeConnectionInfoPtr info = ICE_MAKE_SHARED(NativeConnectionInfo);
fillConnectionInfo(info, info->nativeCerts);
return info;
}
@@ -580,7 +587,7 @@ IceSSL::TransceiverI::getInfo() const
Ice::ConnectionInfoPtr
IceSSL::TransceiverI::getWSInfo(const Ice::HeaderDict& headers) const
{
- WSSNativeConnectionInfoPtr info = new WSSNativeConnectionInfo();
+ WSSNativeConnectionInfoPtr info = ICE_MAKE_SHARED(WSSNativeConnectionInfo);
fillConnectionInfo(info, info->nativeCerts);
info->headers = headers;
return info;
@@ -628,7 +635,7 @@ IceSSL::TransceiverI::verifyCallback(int ok, X509_STORE_CTX* c)
_nativeCerts.clear();
for(int i = 0; i < sk_X509_num(chain); ++i)
{
- _nativeCerts.push_back(new Certificate(X509_dup(sk_X509_value(chain, i))));
+ _nativeCerts.push_back(ICE_MAKE_SHARED(Certificate, X509_dup(sk_X509_value(chain, i))));
}
sk_X509_pop_free(chain, X509_free);
}