diff options
author | Anthony Neal <aneal@zeroc.com> | 2002-03-25 19:24:16 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2002-03-25 19:24:16 +0000 |
commit | f7f65d1696603ef64422c593f016b654292b388c (patch) | |
tree | 4616eee9ed85a84f631443ce3f69b800e0d4c747 /cpp/test | |
parent | adding support for TIE classes (diff) | |
download | ice-f7f65d1696603ef64422c593f016b654292b388c.tar.bz2 ice-f7f65d1696603ef64422c593f016b654292b388c.tar.xz ice-f7f65d1696603ef64422c593f016b654292b388c.zip |
Updates to allow test/Glacier/starter to run in non-SSL mode.
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/Glacier/starter/Client.cpp | 28 | ||||
-rwxr-xr-x | cpp/test/Glacier/starter/run.py | 14 |
2 files changed, 18 insertions, 24 deletions
diff --git a/cpp/test/Glacier/starter/Client.cpp b/cpp/test/Glacier/starter/Client.cpp index 92b85caa522..73e82038fea 100644 --- a/cpp/test/Glacier/starter/Client.cpp +++ b/cpp/test/Glacier/starter/Client.cpp @@ -88,22 +88,28 @@ CallbackClient::run(int argc, char* argv[]) PropertiesPtr properties = communicator()->getProperties(); - string privateKeyBase64 = IceUtil::Base64::encode(privateKey); - string publicKeyBase64 = IceUtil::Base64::encode(publicKey); - string routerCertString = IceUtil::Base64::encode(routerCert); + string clientConfig = properties->getProperty("Ice.SSL.Client.Config"); + string serverConfig = properties->getProperty("Ice.SSL.Server.Config"); - IceSSL::SystemPtr sslSystem = communicator()->getSslSystem(); - IceSSL::SslExtensionPtr sslExtension = communicator()->getSslExtension(); + if (!clientConfig.empty() && !serverConfig.empty()) + { + string privateKeyBase64 = IceUtil::Base64::encode(privateKey); + string publicKeyBase64 = IceUtil::Base64::encode(publicKey); + string routerCertString = IceUtil::Base64::encode(routerCert); + + IceSSL::SystemPtr sslSystem = communicator()->getSslSystem(); + IceSSL::SslExtensionPtr sslExtension = communicator()->getSslExtension(); - // Configure Server, client is already configured - sslSystem->configure(IceSSL::Server); + // Configure Server, client is already configured + sslSystem->configure(IceSSL::Server); - sslSystem->setCertificateVerifier(IceSSL::ClientServer, sslExtension->getSingleCertVerifier(routerCert)); + sslSystem->setCertificateVerifier(IceSSL::ClientServer, sslExtension->getSingleCertVerifier(routerCert)); - // Set the keys overrides. - sslSystem->setRSAKeysBase64(IceSSL::ClientServer, privateKeyBase64, publicKeyBase64); + // Set the keys overrides. + sslSystem->setRSAKeysBase64(IceSSL::ClientServer, privateKeyBase64, publicKeyBase64); - sslSystem->addTrustedCertificateBase64(IceSSL::ClientServer, routerCertString); + sslSystem->addTrustedCertificateBase64(IceSSL::ClientServer, routerCertString); + } test(router); cout << "ok" << endl; diff --git a/cpp/test/Glacier/starter/run.py b/cpp/test/Glacier/starter/run.py index 09357804665..2dbca1f396a 100755 --- a/cpp/test/Glacier/starter/run.py +++ b/cpp/test/Glacier/starter/run.py @@ -21,10 +21,6 @@ else: sys.path.append(os.path.join(toplevel, "config")) import TestUtil -if TestUtil.protocol != "ssl": - print "This test may only be run using the SSL protocol." - sys.exit(0) - starter = os.path.join(toplevel, "bin", "glacierstarter") router = os.path.join(toplevel, "bin", "glacier") @@ -37,15 +33,7 @@ command = starter + updatedClientServerOptions + \ r' --Glacier.Starter.Endpoints="default -p 12346 -t 5000"' + \ r' --Glacier.Router.Endpoints="default"' + \ r' --Glacier.Client.Endpoints="default"' + \ - r' --Glacier.Server.Endpoints="tcp"' + \ - r' --Glacier.Starter.Certificate.Country=US' + \ - r' --Glacier.Starter.Certificate.StateProvince=Alabama' + \ - r' --Glacier.Starter.Certificate.Locality=Huntsville' + \ - r' --Glacier.Starter.Certificate.Organization="Mutable Realms"' + \ - r' --Glacier.Starter.Certificate.OrganizationalUnit="Ice Age Game"' + \ - r' --Glacier.Starter.Certificate.CommonName="Ice Age Certificate"' + \ - r' --Glacier.Starter.Certificate.BitStrength=1024' + \ - r' --Glacier.Starter.Certificate.SecondsValid=31536000' + r' --Glacier.Server.Endpoints="tcp"' print "starting glacier starter...", starterPipe = os.popen(command) |