summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-06-02 22:35:59 +0200
committerJose <jose@zeroc.com>2015-06-02 22:35:59 +0200
commitd6591a78fd80c17e09b45bc76b972806d25772a4 (patch)
tree1df4f32c5a014e763a8c9adbe589f77380b0c9f2
parentFixed ICE-6557 - non virtual destructor warnings (diff)
downloadice-d6591a78fd80c17e09b45bc76b972806d25772a4.tar.bz2
ice-d6591a78fd80c17e09b45bc76b972806d25772a4.tar.xz
ice-d6591a78fd80c17e09b45bc76b972806d25772a4.zip
WinRT connection info fixes
-rw-r--r--cpp/src/Ice/winrt/StreamTransceiver.cpp9
-rw-r--r--cpp/src/Ice/winrt/StreamTransceiver.h1
-rw-r--r--cpp/test/Ice/info/AllTests.cpp2
3 files changed, 10 insertions, 2 deletions
diff --git a/cpp/src/Ice/winrt/StreamTransceiver.cpp b/cpp/src/Ice/winrt/StreamTransceiver.cpp
index 7cf9946ed9c..76a0f3fb7f0 100644
--- a/cpp/src/Ice/winrt/StreamTransceiver.cpp
+++ b/cpp/src/Ice/winrt/StreamTransceiver.cpp
@@ -159,6 +159,7 @@ IceInternal::StreamTransceiver::startWrite(Buffer& buf)
else
{
_write.count = 0;
+ _verified = true;
}
_completedHandler(SocketOperationConnect);
});
@@ -296,7 +297,9 @@ IceInternal::StreamTransceiver::getInfo() const
Ice::IPConnectionInfoPtr info;
if(_instance->secure())
{
- info = new IceSSL::ConnectionInfo();
+ IceSSL::ConnectionInfoPtr sslInfo = new IceSSL::ConnectionInfo();
+ sslInfo->verified = _verified;
+ info = sslInfo;
}
else
{
@@ -312,6 +315,7 @@ IceInternal::StreamTransceiver::getWSInfo(const Ice::HeaderDict& headers) const
if(_instance->secure())
{
IceSSL::WSSConnectionInfoPtr info = new IceSSL::WSSConnectionInfo();
+ info->verified = _verified;
fillConnectionInfo(info);
info->headers = headers;
return info;
@@ -340,7 +344,8 @@ IceInternal::StreamTransceiver::StreamTransceiver(const ProtocolInstancePtr& ins
NativeInfo(fd),
_instance(instance),
_state(connected ? StateConnected : StateNeedConnect),
- _desc(connected ? fdToString(_fd) : string())
+ _desc(connected ? fdToString(_fd) : string()),
+ _verified(false)
{
StreamSocket^ streamSocket = safe_cast<StreamSocket^>(_fd);
_writer = ref new DataWriter(streamSocket->OutputStream);
diff --git a/cpp/src/Ice/winrt/StreamTransceiver.h b/cpp/src/Ice/winrt/StreamTransceiver.h
index 6d7effd8e49..2fc822868f0 100644
--- a/cpp/src/Ice/winrt/StreamTransceiver.h
+++ b/cpp/src/Ice/winrt/StreamTransceiver.h
@@ -70,6 +70,7 @@ private:
State _state;
std::string _desc;
+ bool _verified;
Address _connectAddr;
AsyncInfo _read;
diff --git a/cpp/test/Ice/info/AllTests.cpp b/cpp/test/Ice/info/AllTests.cpp
index d671ac9b17c..e07414e7816 100644
--- a/cpp/test/Ice/info/AllTests.cpp
+++ b/cpp/test/Ice/info/AllTests.cpp
@@ -199,7 +199,9 @@ allTests(const Ice::CommunicatorPtr& communicator)
{
headers = wssinfo->headers;
test(wssinfo->verified);
+#if !defined(ICE_OS_WINRT) && TARGET_OS_IPHONE==0
test(!wssinfo->certs.empty());
+#endif
}
test(headers["Upgrade"] == "websocket");