diff options
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/IceSSL/certificateAndKeyParsing/CertificateAndKeyParsing.cpp | 56 | ||||
-rwxr-xr-x | cpp/test/IceSSL/certificateAndKeyParsing/run.py | 3 | ||||
-rw-r--r-- | cpp/test/IceSSL/certificateVerifier/CertificateVerifier.cpp | 18 | ||||
-rwxr-xr-x | cpp/test/IceSSL/certificateVerifier/run.py | 3 | ||||
-rw-r--r-- | cpp/test/IceSSL/configuration/Configuration.cpp | 6 | ||||
-rwxr-xr-x | cpp/test/IceSSL/configuration/run.py | 3 | ||||
-rw-r--r-- | cpp/test/IceSSL/loadPEM/LoadPEM.cpp | 12 | ||||
-rwxr-xr-x | cpp/test/IceSSL/loadPEM/run.py | 3 |
8 files changed, 54 insertions, 50 deletions
diff --git a/cpp/test/IceSSL/certificateAndKeyParsing/CertificateAndKeyParsing.cpp b/cpp/test/IceSSL/certificateAndKeyParsing/CertificateAndKeyParsing.cpp index b000eaab2f1..422c06630e1 100644 --- a/cpp/test/IceSSL/certificateAndKeyParsing/CertificateAndKeyParsing.cpp +++ b/cpp/test/IceSSL/certificateAndKeyParsing/CertificateAndKeyParsing.cpp @@ -644,88 +644,88 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) badKey = IceUtil::Base64::decode(badKeyb64);
badCert = IceUtil::Base64::decode(badCertb64);
- std::cout << "Testing certificate and key parsing failures." << std::endl;
+ std::cout << "testing certificate and key parsing failures." << std::endl;
- std::cout << "Bad private key and certificate (Base64)... " << std::flush;
+ std::cout << "bad private key and certificate (Base64)... " << std::flush;
testExpectCertificateAndPrivateKeyParseException(system, badKeyb64, badCertb64);
- std::cout << "Bad private key and certificate... " << std::flush;
+ std::cout << "bad private key and certificate... " << std::flush;
testExpectCertificateAndPrivateKeyParseException(system, badKey, badCert);
- std::cout << "Bad private key and good certificate (Base64)... " << std::flush;
+ std::cout << "bad private key and good certificate (Base64)... " << std::flush;
testExpectPrivateKeyParseException(system, badKeyb64, gcert1b64);
- std::cout << "Bad private key and good certificate... " << std::flush;
+ std::cout << "bad private key and good certificate... " << std::flush;
testExpectPrivateKeyParseException(system, badKey, gcert1);
- std::cout << "Good private key and bad certificate (Base64)... " << std::flush;
+ std::cout << "good private key and bad certificate (Base64)... " << std::flush;
testExpectCertificateParseException(system, gkey1b64, badCertb64);
- std::cout << "Good private key and bad certificate... " << std::flush;
+ std::cout << "good private key and bad certificate... " << std::flush;
testExpectCertificateParseException(system, gkey1, badCert);
- std::cout << "Bad certificate as a trusted certificate... " << std::flush;
+ std::cout << "bad certificate as a trusted certificate... " << std::flush;
testExpectCertificateParseException(system, badCert);
- std::cout << "Bad certificate as a trusted certificate (Base64)... " << std::flush;
+ std::cout << "bad certificate as a trusted certificate (Base64)... " << std::flush;
testExpectCertificateParseException(system, badCertb64);
- std::cout << "Testing setting good certificates and keys on a unconfigured context." << std::endl;
+ std::cout << "testing setting good certificates and keys on a unconfigured context." << std::endl;
- std::cout << "Good private key and certificate... " << std::flush;
+ std::cout << "good private key and certificate... " << std::flush;
testExpectContextNotConfiguredException(system, gkey1, gcert1);
- std::cout << "Good private key and certificate (Base64)... " << std::flush;
+ std::cout << "good private key and certificate (Base64)... " << std::flush;
testExpectContextNotConfiguredException(system, gkey1b64, gcert1b64);
- std::cout << "Good private key and certificate (again)... " << std::flush;
+ std::cout << "good private key and certificate (again)... " << std::flush;
testExpectContextNotConfiguredException(system, gkey2, gcert2);
- std::cout << "Good private key and certificate (Base64) (again)... " << std::flush;
+ std::cout << "good private key and certificate (Base64) (again)... " << std::flush;
testExpectContextNotConfiguredException(system, gkey2b64, gcert2b64);
- std::cout << "Good certificate as a trusted certificate... " << std::flush;
+ std::cout << "good certificate as a trusted certificate... " << std::flush;
testExpectContextNotConfiguredException(system, gcert1);
- std::cout << "Good certificate as a trusted certificate (Base64)... " << std::flush;
+ std::cout << "good certificate as a trusted certificate (Base64)... " << std::flush;
testExpectContextNotConfiguredException(system, gcert1b64);
properties->setProperty("Ice.SSL.Client.CertPath", clientTestCertPath);
properties->setProperty("Ice.SSL.Client.Config", "sslconfig_6.xml");
system->configure(IceSSL::Client);
- std::cout << "Testing mismatched certificates and keys failures on a configured context." << std::endl;
+ std::cout << "testing mismatched certificates and keys failures on a configured context." << std::endl;
- std::cout << "Good private key and certificate, mismatched... " << std::flush;
+ std::cout << "good private key and certificate, mismatched... " << std::flush;
testExpectCertificateKeyMatchException(system, gkey1, gcert2);
- std::cout << "Good private key and certificate, mismatched (Base64)... " << std::flush;
+ std::cout << "good private key and certificate, mismatched (Base64)... " << std::flush;
testExpectCertificateKeyMatchException(system, gkey1b64, gcert2b64);
- std::cout << "Good private key and certificate, mismatched (again)... " << std::flush;
+ std::cout << "good private key and certificate, mismatched (again)... " << std::flush;
testExpectCertificateKeyMatchException(system, gkey2, gcert1);
- std::cout << "Good private key and certificate, mismatched (Base64) (again)... " << std::flush;
+ std::cout << "good private key and certificate, mismatched (Base64) (again)... " << std::flush;
testExpectCertificateKeyMatchException(system, gkey2b64, gcert1b64);
- std::cout << "Testing setting good certificates and keys on a configured context." << std::endl;
+ std::cout << "testing setting good certificates and keys on a configured context." << std::endl;
- std::cout << "Good private key and certificate... " << std::flush;
+ std::cout << "good private key and certificate... " << std::flush;
testNoException(system, gkey1, gcert1);
- std::cout << "Good private key and certificate (Base64)... " << std::flush;
+ std::cout << "good private key and certificate (Base64)... " << std::flush;
testNoException(system, gkey1b64, gcert1b64);
- std::cout << "Good private key and certificate (again)... " << std::flush;
+ std::cout << "good private key and certificate (again)... " << std::flush;
testNoException(system, gkey2, gcert2);
- std::cout << "Good private key and certificate (Base64) (again)... " << std::flush;
+ std::cout << "good private key and certificate (Base64) (again)... " << std::flush;
testNoException(system, gkey2b64, gcert2b64);
- std::cout << "Good certificate as trusted certificate... " << std::flush;
+ std::cout << "good certificate as trusted certificate... " << std::flush;
testNoException(system, gcert1);
- std::cout << "Good certificate as trusted certificate (Base64)... " << std::flush;
+ std::cout << "good certificate as trusted certificate (Base64)... " << std::flush;
testNoException(system, gcert2b64);
return EXIT_SUCCESS;
diff --git a/cpp/test/IceSSL/certificateAndKeyParsing/run.py b/cpp/test/IceSSL/certificateAndKeyParsing/run.py index 5bbdaaa3014..8694a25caf0 100755 --- a/cpp/test/IceSSL/certificateAndKeyParsing/run.py +++ b/cpp/test/IceSSL/certificateAndKeyParsing/run.py @@ -30,7 +30,8 @@ testOptions = " --Ice.SSL.Test.Client.CertPath=TOPLEVELDIR/test/IceSSL/certs" testdir = os.path.join(toplevel,"test", "IceSSL", "certificateAndKeyParsing") client = os.path.join(testdir, "certificateAndKeyParsing") -updatedOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel) +localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost +updatedOptions = localClientOptions.replace("TOPLEVELDIR", toplevel) testOptions = testOptions.replace("TOPLEVELDIR", toplevel) print "starting certificateAndKeyParsing...", clientPipe = os.popen(client + updatedOptions + testOptions) diff --git a/cpp/test/IceSSL/certificateVerifier/CertificateVerifier.cpp b/cpp/test/IceSSL/certificateVerifier/CertificateVerifier.cpp index 12b31e945f1..00a3c5c5079 100644 --- a/cpp/test/IceSSL/certificateVerifier/CertificateVerifier.cpp +++ b/cpp/test/IceSSL/certificateVerifier/CertificateVerifier.cpp @@ -115,36 +115,36 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) // Testing IceSSL::Client context type.
//
- std::cout << "Setting Certificate Verifiers on Client context." << std::endl;
+ std::cout << "setting Certificate Verifiers on Client context." << std::endl;
- std::cout << "Setting verifier of wrong type... " << std::flush;
+ std::cout << "setting verifier of wrong type... " << std::flush;
testExpectCertificateVerifierTypeException(system, IceSSL::Client, badVerifier);
- std::cout << "Setting verifier of correct type... " << std::flush;
+ std::cout << "setting verifier of correct type... " << std::flush;
testExpectNoException(system, IceSSL::Client, goodVerifier);
//
// Testing IceSSL::Server context type.
//
- std::cout << "Setting Certificate Verifiers on Server context." << std::endl;
+ std::cout << "setting Certificate Verifiers on Server context." << std::endl;
- std::cout << "Setting verifier of wrong type... " << std::flush;
+ std::cout << "setting verifier of wrong type... " << std::flush;
testExpectCertificateVerifierTypeException(system, IceSSL::Server, badVerifier);
- std::cout << "Setting verifier of correct type... " << std::flush;
+ std::cout << "setting verifier of correct type... " << std::flush;
testExpectNoException(system, IceSSL::Server, goodVerifier);
//
// Testing IceSSL::ClientServer context type.
//
- std::cout << "Setting Certificate Verifiers on Client and Server contexts." << std::endl;
+ std::cout << "setting Certificate Verifiers on Client and Server contexts." << std::endl;
- std::cout << "Setting verifier of wrong type... " << std::flush;
+ std::cout << "setting verifier of wrong type... " << std::flush;
testExpectCertificateVerifierTypeException(system, IceSSL::ClientServer, badVerifier);
- std::cout << "Setting verifier of correct type... " << std::flush;
+ std::cout << "setting verifier of correct type... " << std::flush;
testExpectNoException(system, IceSSL::ClientServer, goodVerifier);
return EXIT_SUCCESS;
diff --git a/cpp/test/IceSSL/certificateVerifier/run.py b/cpp/test/IceSSL/certificateVerifier/run.py index f0563cfce87..35a4fb466f5 100755 --- a/cpp/test/IceSSL/certificateVerifier/run.py +++ b/cpp/test/IceSSL/certificateVerifier/run.py @@ -28,7 +28,8 @@ if TestUtil.protocol != "ssl": testdir = os.path.join(toplevel,"test", "IceSSL", "certificateVerifier") client = os.path.join(testdir, "certificateVerifier") -updatedOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel) +localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost +updatedOptions = localClientOptions.replace("TOPLEVELDIR", toplevel) print "starting certificateVerifier...", clientPipe = os.popen(client + updatedOptions) output = clientPipe.read().strip() diff --git a/cpp/test/IceSSL/configuration/Configuration.cpp b/cpp/test/IceSSL/configuration/Configuration.cpp index 3707d31d85d..51a7069ad70 100644 --- a/cpp/test/IceSSL/configuration/Configuration.cpp +++ b/cpp/test/IceSSL/configuration/Configuration.cpp @@ -47,19 +47,19 @@ testContextWithConfig(const Ice::CommunicatorPtr& communicator, {
case IceSSL::Client:
{
- contextString = "Client";
+ contextString = "client";
break;
}
case IceSSL::Server:
{
- contextString = "Server";
+ contextString = "server";
break;
}
case IceSSL::ClientServer:
{
- contextString = "ClientServer";
+ contextString = "client/server";
break;
}
}
diff --git a/cpp/test/IceSSL/configuration/run.py b/cpp/test/IceSSL/configuration/run.py index 848756709b9..cc95e7ea743 100755 --- a/cpp/test/IceSSL/configuration/run.py +++ b/cpp/test/IceSSL/configuration/run.py @@ -28,7 +28,8 @@ if TestUtil.protocol != "ssl": testdir = os.path.join(toplevel,"test", "IceSSL", "configuration") client = os.path.join(testdir, "configuration") -updatedOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel) +localClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost +updatedOptions = localClientOptions.replace("TOPLEVELDIR", toplevel) print "starting configuration...", clientPipe = os.popen(client + updatedOptions) output = clientPipe.read().strip() diff --git a/cpp/test/IceSSL/loadPEM/LoadPEM.cpp b/cpp/test/IceSSL/loadPEM/LoadPEM.cpp index 9ae6f34f50c..31715702478 100644 --- a/cpp/test/IceSSL/loadPEM/LoadPEM.cpp +++ b/cpp/test/IceSSL/loadPEM/LoadPEM.cpp @@ -193,22 +193,22 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) PropertiesPtr properties = communicator->getProperties();
// properties->setProperty("Ice.SSL.Client.CertPath", "../certs");
- std::cout << "Bad private key and certificate... " << std::flush;
+ std::cout << "bad private key and certificate... " << std::flush;
testExpectCertificateAndPrivateKeyLoadException(communicator, "sslconfig_1.xml");
- std::cout << "Bad private key and good certificate 1... " << std::flush;
+ std::cout << "bad private key and good certificate 1... " << std::flush;
testExpectPrivateKeyLoadException(communicator, "sslconfig_2.xml");
- std::cout << "Good private key 1 and bad certificate... " << std::flush;
+ std::cout << "good private key 1 and bad certificate... " << std::flush;
testExpectCertificateLoadException(communicator, "sslconfig_3.xml");
- std::cout << "Good private key 1 and good certificate 2, mismatched... " << std::flush;
+ std::cout << "good private key 1 and good certificate 2, mismatched... " << std::flush;
testExpectCertificateKeyMatchException(communicator, "sslconfig_4.xml");
- std::cout << "Good private key 2 and good certificate 1, mismatched (again)... " << std::flush;
+ std::cout << "good private key 2 and good certificate 1, mismatched (again)... " << std::flush;
testExpectCertificateKeyMatchException(communicator, "sslconfig_5.xml");
- std::cout << "Good matched private key and certificate... " << std::flush;
+ std::cout << "good matched private key and certificate... " << std::flush;
testNoException(communicator, "sslconfig_6.xml");
return EXIT_SUCCESS;
diff --git a/cpp/test/IceSSL/loadPEM/run.py b/cpp/test/IceSSL/loadPEM/run.py index 08c09599052..4ea2daf062e 100755 --- a/cpp/test/IceSSL/loadPEM/run.py +++ b/cpp/test/IceSSL/loadPEM/run.py @@ -30,7 +30,8 @@ testOptions = " --Ice.SSL.Client.CertPath=TOPLEVELDIR/test/IceSSL/certs" testdir = os.path.join(toplevel,"test", "IceSSL", "loadPEM") client = os.path.join(testdir, "loadPEM") -updatedOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel) +loaclClientOptions = TestUtil.clientServerProtocol + TestUtil.defaultHost +updatedOptions = localClientOptions.replace("TOPLEVELDIR", toplevel) testOptions = testOptions.replace("TOPLEVELDIR", toplevel) print "starting loadPEM...", clientPipe = os.popen(client + updatedOptions + testOptions) |