diff options
author | Anthony Neal <aneal@zeroc.com> | 2002-02-15 20:46:43 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2002-02-15 20:46:43 +0000 |
commit | 183b34b8ec601e0ad6c7b08e0750c28170fe60eb (patch) | |
tree | eafa964239be6f17e89dee277a89ac30ae39ed78 /cpp | |
parent | adding test scripts (diff) | |
download | ice-183b34b8ec601e0ad6c7b08e0750c28170fe60eb.tar.bz2 ice-183b34b8ec601e0ad6c7b08e0750c28170fe60eb.tar.xz ice-183b34b8ec601e0ad6c7b08e0750c28170fe60eb.zip |
Initial work on the Glacier Router Starter - Ice file has been modified,
and now startRouter() returns a publicKey and privateKey to the client.
Work will continue to load that into the client's SSL context.
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/config/TestUtil.py | 4 | ||||
-rw-r--r-- | cpp/slice/Glacier/Glacier.ice | 3 | ||||
-rw-r--r-- | cpp/src/Glacier/GlacierI.cpp | 6 | ||||
-rw-r--r-- | cpp/src/Glacier/GlacierI.h | 6 | ||||
-rw-r--r-- | cpp/src/Ice/SslRSACertificateGen.cpp | 3 | ||||
-rw-r--r-- | cpp/test/Glacier/starter/Client.cpp | 6 | ||||
-rwxr-xr-x | cpp/test/Glacier/starter/run.py | 12 |
7 files changed, 26 insertions, 14 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py index 403293a5b1e..57d364473a2 100644 --- a/cpp/config/TestUtil.py +++ b/cpp/config/TestUtil.py @@ -14,8 +14,8 @@ # protocol. Otherwise TCP is used. # -protocol = "ssl" -#protocol = "" +#protocol = "ssl" +protocol = "" # # Set the host to the host name the test servers are running on. If not diff --git a/cpp/slice/Glacier/Glacier.ice b/cpp/slice/Glacier/Glacier.ice index d9f0f4cae4e..43fa6b4a970 100644 --- a/cpp/slice/Glacier/Glacier.ice +++ b/cpp/slice/Glacier/Glacier.ice @@ -12,6 +12,7 @@ #define GLACIER_ICE #include <Ice/Router.ice> +#include <Ice/BuiltinSequences.ice> /** * @@ -63,7 +64,7 @@ interface Starter * given user id is not correct. * **/ - Ice::Router* startRouter(string userId, string password) + Ice::Router* startRouter(string userId, string password; Ice::ByteSeq privateKey, Ice::ByteSeq publicKey) throws InvalidPasswordException, CannotStartRouterException; }; diff --git a/cpp/src/Glacier/GlacierI.cpp b/cpp/src/Glacier/GlacierI.cpp index 8ba6e9bfed3..ac63f0eefd6 100644 --- a/cpp/src/Glacier/GlacierI.cpp +++ b/cpp/src/Glacier/GlacierI.cpp @@ -56,7 +56,7 @@ Glacier::StarterI::destroy() } RouterPrx -Glacier::StarterI::startRouter(const string& userId, const string& password, const Current&) +Glacier::StarterI::startRouter(const string& userId, const string& password, ByteSeq& privateKey, ByteSeq& publicKey, const Current&) { assert(_communicator); // Destroyed? @@ -75,8 +75,8 @@ Glacier::StarterI::startRouter(const string& userId, const string& password, con ByteSeq clientCertificate; ByteSeq routerCertificate; - clientKeyPair->keyToByteSeq(clientPrivateKey); - clientKeyPair->certToByteSeq(clientCertificate); + clientKeyPair->keyToByteSeq(privateKey); + clientKeyPair->certToByteSeq(publicKey); routerKeyPair->certToByteSeq(routerCertificate); // routerPrivateKeyBase64 and routerCertificateBase64 are passed to the diff --git a/cpp/src/Glacier/GlacierI.h b/cpp/src/Glacier/GlacierI.h index fce5297a5a8..70bdad973dd 100644 --- a/cpp/src/Glacier/GlacierI.h +++ b/cpp/src/Glacier/GlacierI.h @@ -29,7 +29,11 @@ public: void destroy(); - Ice::RouterPrx startRouter(const std::string&, const std::string&, const Ice::Current&); + Ice::RouterPrx startRouter(const std::string&, + const std::string&, + Ice::ByteSeq&, + Ice::ByteSeq&, + const Ice::Current&); private: diff --git a/cpp/src/Ice/SslRSACertificateGen.cpp b/cpp/src/Ice/SslRSACertificateGen.cpp index 64f2cf16eff..8b081c9c6af 100644 --- a/cpp/src/Ice/SslRSACertificateGen.cpp +++ b/cpp/src/Ice/SslRSACertificateGen.cpp @@ -248,6 +248,3 @@ IceSecurity::Ssl::OpenSSL::RSACertificateGen::generate(const RSACertificateGenCo return keyPairPtr;
}
-
-
-
diff --git a/cpp/test/Glacier/starter/Client.cpp b/cpp/test/Glacier/starter/Client.cpp index 1abe3b1e9cb..c90778804af 100644 --- a/cpp/test/Glacier/starter/Client.cpp +++ b/cpp/test/Glacier/starter/Client.cpp @@ -56,11 +56,14 @@ CallbackClient::run(int argc, char* argv[]) test(starter); cout << "ok" << endl; + ByteSeq privateKey; + ByteSeq publicKey; + cout << "starting up glacier router... " << flush; RouterPrx router; try { - router = starter->startRouter("", ""); + router = starter->startRouter("", "", privateKey, publicKey); } catch (const Glacier::CannotStartRouterException& ex) { @@ -72,6 +75,7 @@ CallbackClient::run(int argc, char* argv[]) cerr << appName() << ": " << ex << endl; return EXIT_FAILURE; } + test(router); cout << "ok" << endl; diff --git a/cpp/test/Glacier/starter/run.py b/cpp/test/Glacier/starter/run.py index 18daaa51151..831e2276260 100755 --- a/cpp/test/Glacier/starter/run.py +++ b/cpp/test/Glacier/starter/run.py @@ -34,9 +34,15 @@ 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="default"' - -print command + r' --Glacier.Server.Endpoints="default"' + \ + 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' starterPipe = os.popen(command) TestUtil.getServerPid(starterPipe) |