summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/SecureTransportTransceiverI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceSSL/SecureTransportTransceiverI.cpp')
-rw-r--r--cpp/src/IceSSL/SecureTransportTransceiverI.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/cpp/src/IceSSL/SecureTransportTransceiverI.cpp b/cpp/src/IceSSL/SecureTransportTransceiverI.cpp
index 3b532b059fc..dc9d421b957 100644
--- a/cpp/src/IceSSL/SecureTransportTransceiverI.cpp
+++ b/cpp/src/IceSSL/SecureTransportTransceiverI.cpp
@@ -175,7 +175,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)
@@ -258,7 +258,7 @@ IceSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal::B
<< "remote address = " << desc << "\n" << errorToString(err);
throw ProtocolException(__FILE__, __LINE__, os.str());
}
- _engine->verifyPeer(_stream->fd(), _host, NativeConnectionInfoPtr::dynamicCast(getInfo()));
+ _engine->verifyPeer(_stream->fd(), _host, ICE_DYNAMIC_CAST(NativeConnectionInfo, getInfo()));
if(_instance->engine()->securityTraceLevel() >= 1)
{
@@ -290,7 +290,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.
@@ -396,7 +400,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())
{
@@ -404,10 +408,9 @@ IceSSL::TransceiverI::read(IceInternal::Buffer& buf, bool&)
}
//
- // Note: we don't set the hasMoreData flag in this implementation.
- // We assume that SecureTransport doesn't read more SSL records
- // than necessary to fill the requested data and that the sender
- // sends Ice messages in individual SSL records.
+ // Note: we assume that SecureTransport doesn't read more SSL records
+ // than necessary to fill the requested data and that the sender sends
+ // Ice messages in individual SSL records.
//
if(buf.i == buf.b.end())
@@ -485,7 +488,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;
}
@@ -493,7 +496,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;
@@ -555,7 +558,7 @@ IceSSL::TransceiverI::fillConnectionInfo(const ConnectionInfoPtr& info, std::vec
SecCertificateRef cert = SecTrustGetCertificateAtIndex(_trust, i);
CFRetain(cert);
- CertificatePtr certificate = new Certificate(cert);
+ CertificatePtr certificate = ICE_MAKE_SHARED(Certificate, cert);
nativeCerts.push_back(certificate);
info->certs.push_back(certificate->encode());
}