summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2005-11-04 07:24:01 +0000
committerMatthew Newhook <matthew@zeroc.com>2005-11-04 07:24:01 +0000
commitd8c5ecdfda8554b650fd4f3c229bcccc439d6e1a (patch)
tree1e81a202c10e02d32f10916aca6447c33f397759 /cpp
parenthttp://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=570 (diff)
downloadice-d8c5ecdfda8554b650fd4f3c229bcccc439d6e1a.tar.bz2
ice-d8c5ecdfda8554b650fd4f3c229bcccc439d6e1a.tar.xz
ice-d8c5ecdfda8554b650fd4f3c229bcccc439d6e1a.zip
some cleanup.
Diffstat (limited to 'cpp')
-rw-r--r--cpp/test/IceSSL/certificateVerification/Client.cpp20
-rw-r--r--cpp/test/IceSSL/certificateVerification/Pinger.ice1
-rw-r--r--cpp/test/IceSSL/certificateVerification/Server.cpp40
3 files changed, 23 insertions, 38 deletions
diff --git a/cpp/test/IceSSL/certificateVerification/Client.cpp b/cpp/test/IceSSL/certificateVerification/Client.cpp
index bf3905afe76..714ccc1d201 100644
--- a/cpp/test/IceSSL/certificateVerification/Client.cpp
+++ b/cpp/test/IceSSL/certificateVerification/Client.cpp
@@ -64,8 +64,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
sslPlugin->addTrustedCertificate(IceSSL::Client, serverTrustedCert);
try
{
- PingerPrx pinger1 = PingerPrx::checkedCast(communicator->stringToProxy(ref1));
- pinger1->ping();
+ Ice::ObjectPrx pinger1 = communicator->stringToProxy(ref1);
+ pinger1->ice_ping();
cout << "ok" << endl;
}
catch(const Ice::LocalException& ex)
@@ -91,8 +91,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
sslPlugin->setRSAKeys(IceSSL::Client, clientUntrustedKey, clientUntrustedCert);
try
{
- PingerPrx pinger2 = PingerPrx::checkedCast(communicator->stringToProxy(ref2));
- pinger2->ping();
+ Ice::ObjectPrx pinger2 = communicator->stringToProxy(ref2);
+ pinger2->ice_ping();
km->shutdown();
test(false);
}
@@ -113,8 +113,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
sslPlugin->setRSAKeys(IceSSL::Client, clientTrustedKey, clientTrustedCert);
try
{
- PingerPrx pinger3 = PingerPrx::checkedCast(communicator->stringToProxy(ref3));
- pinger3->ping();
+ Ice::ObjectPrx pinger3 = communicator->stringToProxy(ref3);
+ pinger3->ice_ping();
km->shutdown();
test(false);
}
@@ -142,8 +142,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
sslPlugin->setRSAKeys(IceSSL::Client, clientUntrustedKey, clientUntrustedCert);
try
{
- PingerPrx pinger4 = PingerPrx::checkedCast(communicator->stringToProxy(ref4));
- pinger4->ping();
+ Ice::ObjectPrx pinger4 = communicator->stringToProxy(ref4);
+ pinger4->ice_ping();
km->shutdown();
test(false);
}
@@ -167,8 +167,8 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
try
{
- PingerPrx pinger5 = PingerPrx::checkedCast(communicator->stringToProxy(ref5));
- pinger5->ping();
+ Ice::ObjectPrx pinger5 = communicator->stringToProxy(ref5);
+ pinger5->ice_ping();
cout << "ok" << endl;
}
catch(const Ice::LocalException& ex)
diff --git a/cpp/test/IceSSL/certificateVerification/Pinger.ice b/cpp/test/IceSSL/certificateVerification/Pinger.ice
index 283599ec399..f89d0fe9683 100644
--- a/cpp/test/IceSSL/certificateVerification/Pinger.ice
+++ b/cpp/test/IceSSL/certificateVerification/Pinger.ice
@@ -25,7 +25,6 @@ class KeyManager
class Pinger
{
- void ping();
};
};
diff --git a/cpp/test/IceSSL/certificateVerification/Server.cpp b/cpp/test/IceSSL/certificateVerification/Server.cpp
index 9a80e310fec..eedb2190711 100644
--- a/cpp/test/IceSSL/certificateVerification/Server.cpp
+++ b/cpp/test/IceSSL/certificateVerification/Server.cpp
@@ -20,9 +20,9 @@ class KeyManagerI : public KeyManager
{
public:
+
KeyManagerI(const IceSSL::RSAKeyPairPtr&, const IceSSL::RSAKeyPairPtr&,
- const IceSSL::RSAKeyPairPtr&, const IceSSL::RSAKeyPairPtr&,
- const Ice::CommunicatorPtr&);
+ const IceSSL::RSAKeyPairPtr&, const IceSSL::RSAKeyPairPtr&);
virtual void getServerCerts(Ice::ByteSeq&, Ice::ByteSeq&, const ::Ice::Current&);
virtual void getTrustedClientKeys(Ice::ByteSeq&, Ice::ByteSeq&, const ::Ice::Current&);
@@ -30,21 +30,19 @@ public:
virtual void shutdown(const ::Ice::Current&);
protected:
- IceSSL::RSAKeyPairPtr _serverTrusted;
- IceSSL::RSAKeyPairPtr _serverUntrusted;
- IceSSL::RSAKeyPairPtr _clientTrusted;
- IceSSL::RSAKeyPairPtr _clientUntrusted;
- Ice::CommunicatorPtr _communicator;
+
+ const IceSSL::RSAKeyPairPtr _serverTrusted;
+ const IceSSL::RSAKeyPairPtr _serverUntrusted;
+ const IceSSL::RSAKeyPairPtr _clientTrusted;
+ const IceSSL::RSAKeyPairPtr _clientUntrusted;
};
KeyManagerI::KeyManagerI(const IceSSL::RSAKeyPairPtr& serverTrusted,
const IceSSL::RSAKeyPairPtr& serverUntrusted,
const IceSSL::RSAKeyPairPtr& clientTrusted,
- const IceSSL::RSAKeyPairPtr& clientUntrusted,
- const Ice::CommunicatorPtr& communicator) :
+ const IceSSL::RSAKeyPairPtr& clientUntrusted) :
_serverTrusted(serverTrusted), _serverUntrusted(serverUntrusted),
- _clientTrusted(clientTrusted), _clientUntrusted(clientUntrusted),
- _communicator(communicator)
+ _clientTrusted(clientTrusted), _clientUntrusted(clientUntrusted)
{
}
@@ -70,28 +68,18 @@ KeyManagerI::getUntrustedClientKeys(Ice::ByteSeq& key, Ice::ByteSeq& cert, const
}
void
-KeyManagerI::shutdown(const ::Ice::Current&)
+KeyManagerI::shutdown(const ::Ice::Current& c)
{
- _communicator->shutdown();
+ c.adapter->getCommunicator()->shutdown();
}
class PingerI : public Pinger
{
public:
- PingerI();
- virtual void ping(const ::Ice::Current&);
+ PingerI() { }
};
-PingerI::PingerI()
-{
-}
-
-void
-PingerI::ping(const ::Ice::Current&)
-{
-}
-
int
run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
@@ -137,9 +125,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
certGenContext.setCommonName("Client Untrusted");
clientUntrusted = certGen.generate(certGenContext);
- Ice::ObjectPtr object = new KeyManagerI(serverTrusted, serverUntrusted,
- clientTrusted, clientUntrusted,
- communicator);
+ Ice::ObjectPtr object = new KeyManagerI(serverTrusted, serverUntrusted, clientTrusted, clientUntrusted);
Ice::ByteSeq trustedCertificate;
Ice::ByteSeq serverCertificate;