summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/TestUtil.py2
-rw-r--r--cpp/slice/Ice/LocalException.ice3
-rw-r--r--cpp/src/Ice/Collector.cpp19
-rw-r--r--cpp/src/Ice/Emitter.cpp5
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp3
-rw-r--r--cpp/src/Ice/Proxy.cpp5
-rw-r--r--cpp/test/Ice/faultTolerance/AllTests.cpp13
7 files changed, 37 insertions, 13 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index c99e11d7d84..dc6a65533b1 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -11,7 +11,7 @@
import sys, os
-protocol = "tcp"
+protocol = "ssl"
serverOptions = " --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.ServerIdleTime=30" + \
" --Ice.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Ssl.Config=server_sslconfig.xml --Ice.Protocol=" + \
diff --git a/cpp/slice/Ice/LocalException.ice b/cpp/slice/Ice/LocalException.ice
index 440097980ba..8b2389b8311 100644
--- a/cpp/slice/Ice/LocalException.ice
+++ b/cpp/slice/Ice/LocalException.ice
@@ -413,7 +413,8 @@ local exception UnknownReplyStatusException extends ProtocolException
/**
*
* This exception is a specialization of [ProtocolException],
- * indicating that an exception has been closed by the peer.
+ * indicating that the server sent a close connection message in order
+ * to gracefully shut down the connection.
*
**/
local exception CloseConnectionException extends ProtocolException
diff --git a/cpp/src/Ice/Collector.cpp b/cpp/src/Ice/Collector.cpp
index b9c0ebb3e20..7beee8e1228 100644
--- a/cpp/src/Ice/Collector.cpp
+++ b/cpp/src/Ice/Collector.cpp
@@ -22,12 +22,11 @@
#include <Ice/Exception.h>
#include <Ice/Protocol.h>
#include <Ice/Functional.h>
-#include <Ice/SecurityException.h>
+#include <Ice/SecurityException.h> // TODO: bandaid, see below.
using namespace std;
using namespace Ice;
using namespace IceInternal;
-using IceSecurity::SecurityException;
void IceInternal::incRef(Collector* p) { p->__incRef(); }
void IceInternal::decRef(Collector* p) { p->__decRef(); }
@@ -567,17 +566,17 @@ IceInternal::CollectorFactory::message(BasicStream&)
collector->activate();
_collectors.push_back(collector);
}
- catch (const SecurityException& securityEx)
+ catch (const IceSecurity::SecurityException& ex)
{
- // TODO: bandaid. Takes care of SSL Handshake problems during creation of a Transceiver
- // TODO: THIS DOESN'T WORK!!! For some reason it skips it.
- // Ignore, nothing we can do here
- warning(securityEx);
+ // TODO: bandaid. Takes care of SSL Handshake problems during
+ // creation of a Transceiver. Ignore, nothing we can do here.
+ warning(ex);
}
- catch (const SocketException&)
+ catch (const SocketException& ex)
{
- // TODO: bandaid. Takes care of SSL Handshake problems during creation of a Transceiver
- // Ignore, nothing we can do here
+ // TODO: bandaid. Takes care of SSL Handshake problems during
+ // creation of a Transceiver. Ignore, nothing we can do here.
+ warning(ex);
}
catch (const TimeoutException&)
{
diff --git a/cpp/src/Ice/Emitter.cpp b/cpp/src/Ice/Emitter.cpp
index 0d7f50d934b..a7817dbfd53 100644
--- a/cpp/src/Ice/Emitter.cpp
+++ b/cpp/src/Ice/Emitter.cpp
@@ -21,6 +21,7 @@
#include <Ice/Exception.h>
#include <Ice/Protocol.h>
#include <Ice/Functional.h>
+#include <Ice/SecurityException.h> // TODO: bandaid, see below.
using namespace std;
using namespace Ice;
@@ -492,6 +493,10 @@ IceInternal::EmitterFactory::create(const vector<EndpointPtr>& endpoints)
{
exception = auto_ptr<LocalException>(dynamic_cast<LocalException*>(ex.ice_clone()));
}
+ catch (const IceSecurity::SecurityException& ex) // TODO: bandaid to make retry w/ ssl work.
+ {
+ exception = auto_ptr<LocalException>(dynamic_cast<LocalException*>(ex.ice_clone()));
+ }
catch (const DNSException& ex)
{
exception = auto_ptr<LocalException>(dynamic_cast<LocalException*>(ex.ice_clone()));
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index 1fbe4c62ab6..eb2f07d0b27 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -370,7 +370,8 @@ Ice::ObjectAdapterI::newProxy(const string& ident)
makeSecure = true;
}
- ReferencePtr reference = new Reference(_instance, ident, "", Reference::ModeTwoway, makeSecure /* false */, endpoints, endpoints);
+ ReferencePtr reference = new Reference(_instance, ident, "", Reference::ModeTwoway, makeSecure /* false */,
+ endpoints, endpoints);
return _instance->proxyFactory()->referenceToProxy(reference);
}
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index 0d83cbfa204..0d642e39a69 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -22,6 +22,7 @@
#include <Ice/BasicStream.h>
#include <Ice/Exception.h>
#include <Ice/Functional.h>
+#include <Ice/SecurityException.h> // TODO: bandaid, see below.
using namespace std;
using namespace Ice;
@@ -347,6 +348,10 @@ IceProxy::Ice::Object::__handleException(const LocalException& ex, int& cnt)
{
++cnt;
}
+ catch (const IceSecurity::SecurityException& ex) // TODO: bandaid to make retry w/ ssl work.
+ {
+ ++cnt;
+ }
catch (const DNSException&)
{
++cnt;
diff --git a/cpp/test/Ice/faultTolerance/AllTests.cpp b/cpp/test/Ice/faultTolerance/AllTests.cpp
index 34d785a938e..9c92d2b1302 100644
--- a/cpp/test/Ice/faultTolerance/AllTests.cpp
+++ b/cpp/test/Ice/faultTolerance/AllTests.cpp
@@ -11,6 +11,7 @@
#include <Ice/Ice.h>
#include <TestCommon.h>
#include <Test.h>
+#include <Ice/SecurityException.h>
using namespace std;
@@ -77,6 +78,10 @@ allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports)
{
cout << "ok" << endl;
}
+ catch(const IceSecurity::SecurityException&)
+ {
+ cout << "ok" << endl;
+ }
}
else if(j == 2)
{
@@ -90,6 +95,10 @@ allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports)
{
cout << "ok" << endl;
}
+ catch(const IceSecurity::SecurityException&)
+ {
+ cout << "ok" << endl;
+ }
++i;
}
else
@@ -108,4 +117,8 @@ allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports)
{
cout << "ok" << endl;
}
+ catch(const IceSecurity::SecurityException&)
+ {
+ cout << "ok" << endl;
+ }
}