summaryrefslogtreecommitdiff
path: root/cs/test/IceSSL/configuration/TestI.cs
diff options
context:
space:
mode:
Diffstat (limited to 'cs/test/IceSSL/configuration/TestI.cs')
-rwxr-xr-xcs/test/IceSSL/configuration/TestI.cs124
1 files changed, 62 insertions, 62 deletions
diff --git a/cs/test/IceSSL/configuration/TestI.cs b/cs/test/IceSSL/configuration/TestI.cs
index 2cc2f3e6ed9..d1761e4000b 100755
--- a/cs/test/IceSSL/configuration/TestI.cs
+++ b/cs/test/IceSSL/configuration/TestI.cs
@@ -15,64 +15,64 @@ internal sealed class ServerI : ServerDisp_
{
internal ServerI(Ice.Communicator communicator)
{
- communicator_ = communicator;
+ communicator_ = communicator;
}
public override void
noCert(Ice.Current current)
{
- try
- {
- IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(current.con);
- test(info.certs == null);
- }
- catch(IceSSL.ConnectionInvalidException)
- {
- test(false);
- }
+ try
+ {
+ IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(current.con);
+ test(info.certs == null);
+ }
+ catch(IceSSL.ConnectionInvalidException)
+ {
+ test(false);
+ }
}
public override void
checkCert(string subjectDN, string issuerDN, Ice.Current current)
{
- try
- {
- IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(current.con);
- test(info.certs.Length == 2 &&
- info.certs[0].Subject.Equals(subjectDN) &&
- info.certs[0].Issuer.Equals(issuerDN));
- }
- catch(IceSSL.ConnectionInvalidException)
- {
- test(false);
- }
+ try
+ {
+ IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(current.con);
+ test(info.certs.Length == 2 &&
+ info.certs[0].Subject.Equals(subjectDN) &&
+ info.certs[0].Issuer.Equals(issuerDN));
+ }
+ catch(IceSSL.ConnectionInvalidException)
+ {
+ test(false);
+ }
}
public override void
checkCipher(string cipher, Ice.Current current)
{
- try
- {
- IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(current.con);
- test(info.cipher.Equals(cipher));
- }
- catch(IceSSL.ConnectionInvalidException)
- {
- test(false);
- }
+ try
+ {
+ IceSSL.ConnectionInfo info = IceSSL.Util.getConnectionInfo(current.con);
+ test(info.cipher.Equals(cipher));
+ }
+ catch(IceSSL.ConnectionInvalidException)
+ {
+ test(false);
+ }
}
internal void destroy()
{
- communicator_.destroy();
+ communicator_.destroy();
}
private static void test(bool b)
{
- if (!b)
- {
- throw new Exception();
- }
+ if (!b)
+ {
+ throw new Exception();
+ }
}
private Ice.Communicator communicator_;
@@ -82,47 +82,47 @@ internal sealed class ServerFactoryI : ServerFactoryDisp_
{
private static void test(bool b)
{
- if (!b)
- {
- throw new Exception();
- }
+ if (!b)
+ {
+ throw new Exception();
+ }
}
public override ServerPrx createServer(Properties props, Ice.Current current)
{
- Ice.InitializationData initData = new Ice.InitializationData();
- initData.properties = Ice.Util.createProperties();
- foreach(string key in props.Keys)
- {
- initData.properties.setProperty(key, props[key]);
- }
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ foreach(string key in props.Keys)
+ {
+ initData.properties.setProperty(key, props[key]);
+ }
- string[] args = new string[0];
- Ice.Communicator communicator = Ice.Util.initialize(ref args, initData);
- Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints("ServerAdapter", "ssl");
- ServerI server = new ServerI(communicator);
- Ice.ObjectPrx obj = adapter.addWithUUID(server);
- servers_[obj.ice_getIdentity()] = server;
- adapter.activate();
+ string[] args = new string[0];
+ Ice.Communicator communicator = Ice.Util.initialize(ref args, initData);
+ Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints("ServerAdapter", "ssl");
+ ServerI server = new ServerI(communicator);
+ Ice.ObjectPrx obj = adapter.addWithUUID(server);
+ servers_[obj.ice_getIdentity()] = server;
+ adapter.activate();
- return ServerPrxHelper.uncheckedCast(obj);
+ return ServerPrxHelper.uncheckedCast(obj);
}
public override void destroyServer(ServerPrx srv, Ice.Current current)
{
- Ice.Identity key = srv.ice_getIdentity();
- if(servers_.Contains(key))
- {
- ServerI server = servers_[key] as ServerI;
- server.destroy();
- servers_.Remove(key);
- }
+ Ice.Identity key = srv.ice_getIdentity();
+ if(servers_.Contains(key))
+ {
+ ServerI server = servers_[key] as ServerI;
+ server.destroy();
+ servers_.Remove(key);
+ }
}
public override void shutdown(Ice.Current current)
{
- test(servers_.Count == 0);
- current.adapter.getCommunicator().shutdown();
+ test(servers_.Count == 0);
+ current.adapter.getCommunicator().shutdown();
}
private Hashtable servers_ = new Hashtable();