summaryrefslogtreecommitdiff
path: root/cpp/test/IceSSL/certificateVerification/Client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/IceSSL/certificateVerification/Client.cpp')
-rw-r--r--cpp/test/IceSSL/certificateVerification/Client.cpp70
1 files changed, 37 insertions, 33 deletions
diff --git a/cpp/test/IceSSL/certificateVerification/Client.cpp b/cpp/test/IceSSL/certificateVerification/Client.cpp
index 5929d4d9b5a..02fa34e87c2 100644
--- a/cpp/test/IceSSL/certificateVerification/Client.cpp
+++ b/cpp/test/IceSSL/certificateVerification/Client.cpp
@@ -39,44 +39,48 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
Ice::PropertiesPtr properties = communicator->getProperties();
+ // Use test related paths - override values in TestUtil.py
+ std::string clientCertPath = properties->getProperty("Ice.SSL.Test.Client.CertPath");
+ std::string serverCertPath = properties->getProperty("Ice.SSL.Test.Server.CertPath");
+ properties->setProperty("Ice.SSL.Client.CertPath", clientCertPath);
+ properties->setProperty("Ice.SSL.Server.CertPath", serverCertPath);
+
bool singleCertVerifier = false;
if (properties->getProperty("Ice.SSL.Client.CertificateVerifier") == "singleCert")
{
singleCertVerifier = true;
}
-
-/*
-
-// Note: This section is commented out because Ice is currently not destroying SslTransceivers
-// properly, resulting in cached connections (which cause the expected failure sections
-// to succeed, causing the test to fail).
-
- if (!singleCertVerifier)
- {
- cout << "client and server trusted, client using stock certificate... ";
-
- properties->setProperty("Ice.SSL.Client.CertPath","../certs");
- properties->setProperty("Ice.SSL.Client.Config", "sslconfig_6.xml");
- sslSystem->configure(IceSSL::Client);
- sslSystem->addTrustedCertificate(IceSSL::Client, serverTrustedCert);
- try
- {
- PingerPrx pinger = PingerPrx::checkedCast(communicator->stringToProxy(ref));
- pinger->ping();
- cout << "ok" << endl;
- }
- catch(const Ice::LocalException& localEx)
- {
- cout << localEx << endl;
- km->shutdown();
- test(false);
- }
- }
-*/
-
- properties->setProperty("Ice.SSL.Client.CertPath","../certs");
- properties->setProperty("Ice.SSL.Client.Config", "sslconfig_7.xml");
-
+
+/*
+
+// Note: This section is commented out because Ice is currently not destroying SslTransceivers
+// properly, resulting in cached connections (which cause the expected failure sections
+// to succeed, causing the test to fail).
+
+ if (!singleCertVerifier)
+ {
+ cout << "client and server trusted, client using stock certificate... ";
+
+ properties->setProperty("Ice.SSL.Client.Config", "sslconfig_6.xml");
+ sslSystem->configure(IceSSL::Client);
+ sslSystem->addTrustedCertificate(IceSSL::Client, serverTrustedCert);
+ try
+ {
+ PingerPrx pinger = PingerPrx::checkedCast(communicator->stringToProxy(ref));
+ pinger->ping();
+ cout << "ok" << endl;
+ }
+ catch(const Ice::LocalException& localEx)
+ {
+ cout << localEx << endl;
+ km->shutdown();
+ test(false);
+ }
+ }
+*/
+
+ properties->setProperty("Ice.SSL.Client.Config", "sslconfig_7.xml");
+
cout << "client and server do not trust each other... " << flush;
// Neither Client nor Server will trust.