diff options
author | Matthew Newhook <matthew@zeroc.com> | 2009-03-24 12:31:31 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2009-03-24 12:31:31 -0230 |
commit | 4cc5d77c383b6c91c3af9fe44df9687bb9b15580 (patch) | |
tree | 64ce3d6cf35b15497de50f298f7225a8c72f64b6 /java/test/IceSSL/configuration/AllTests.java | |
parent | Merge commit 'origin/R3_3_branch' (diff) | |
download | ice-4cc5d77c383b6c91c3af9fe44df9687bb9b15580.tar.bz2 ice-4cc5d77c383b6c91c3af9fe44df9687bb9b15580.tar.xz ice-4cc5d77c383b6c91c3af9fe44df9687bb9b15580.zip |
Merged android-testsuite branch.
Diffstat (limited to 'java/test/IceSSL/configuration/AllTests.java')
-rw-r--r-- | java/test/IceSSL/configuration/AllTests.java | 216 |
1 files changed, 112 insertions, 104 deletions
diff --git a/java/test/IceSSL/configuration/AllTests.java b/java/test/IceSSL/configuration/AllTests.java index 2012b877641..962e287c929 100644 --- a/java/test/IceSSL/configuration/AllTests.java +++ b/java/test/IceSSL/configuration/AllTests.java @@ -7,6 +7,13 @@ // // ********************************************************************** +package test.IceSSL.configuration; +import java.io.PrintWriter; + +import test.IceSSL.configuration.Test.ServerFactoryPrx; +import test.IceSSL.configuration.Test.ServerFactoryPrxHelper; +import test.IceSSL.configuration.Test.ServerPrx; + // // NOTE: This test is not interoperable with other language mappings. // @@ -60,21 +67,22 @@ public class AllTests return result; } - public static Test.ServerFactoryPrx - allTests(Ice.Communicator communicator, String testDir) + public static ServerFactoryPrx + allTests(test.Util.Application app, String testDir, PrintWriter out) { + Ice.Communicator communicator = app.communicator(); final String factoryRef = "factory:tcp -p 12010 -t 10000"; Ice.ObjectPrx b = communicator.stringToProxy(factoryRef); test(b != null); - Test.ServerFactoryPrx factory = Test.ServerFactoryPrxHelper.checkedCast(b); + ServerFactoryPrx factory = ServerFactoryPrxHelper.checkedCast(b); final String defaultHost = communicator.getProperties().getProperty("Ice.Default.Host"); final String defaultDir = testDir + "/../certs"; final Ice.Properties defaultProperties = communicator.getProperties(); final String[] args = new String[0]; - System.out.print("testing manual initialization... "); - System.out.flush(); + out.print("testing manual initialization... "); + out.flush(); { Ice.InitializationData initData = createClientProps(defaultProperties, defaultDir, defaultHost); initData.properties.setProperty("Ice.InitPlugins", "0"); @@ -105,11 +113,11 @@ public class AllTests pm.initializePlugins(); Ice.ObjectPrx obj = comm.stringToProxy(factoryRef); test(obj != null); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(obj); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(obj); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Ciphers", "NONE (.*DH_anon.*)"); d.put("IceSSL.VerifyPeer", "0"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -121,10 +129,10 @@ public class AllTests fact.destroyServer(server); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing certificate verification... "); - System.out.flush(); + out.print("testing certificate verification... "); + out.flush(); { // // Test IceSSL.VerifyPeer=0. Client does not have a certificate, @@ -133,14 +141,14 @@ public class AllTests Ice.InitializationData initData = createClientProps(defaultProperties, defaultDir, defaultHost); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.VerifyPeer", "0"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.noCert(); @@ -169,7 +177,7 @@ public class AllTests initData = createClientProps(defaultProperties, defaultDir, defaultHost); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); @@ -226,7 +234,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Ciphers", "NONE (.*DH_anon.*)"); initData.properties.setProperty("IceSSL.VerifyPeer", "1"); comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Ciphers", "NONE (.*DH_anon.*)"); @@ -256,7 +264,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); @@ -333,7 +341,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert2.jks"); comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); @@ -369,7 +377,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); @@ -406,7 +414,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); @@ -439,7 +447,7 @@ public class AllTests initData.properties.setProperty("IceSSL.CheckCertName", "1"); comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); @@ -458,10 +466,10 @@ public class AllTests comm.destroy(); } } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing custom certificate verifier... "); - System.out.flush(); + out.print("testing custom certificate verifier... "); + out.flush(); { // // ADH is allowed but will not have a certificate. @@ -475,12 +483,12 @@ public class AllTests CertificateVerifierI verifier = new CertificateVerifierI(); plugin.setCertificateVerifier(verifier); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Ciphers", "NONE (.*DH_anon.*)"); d.put("IceSSL.VerifyPeer", "0"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { String cipherSub = "DH_anon"; @@ -535,14 +543,14 @@ public class AllTests CertificateVerifierI verifier = new CertificateVerifierI(); plugin.setCertificateVerifier(verifier); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.VerifyPeer", "2"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -564,17 +572,17 @@ public class AllTests initData.properties.setProperty("IceSSL.Keystore", "c_rsa_ca1.jks"); initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); - initData.properties.setProperty("IceSSL.CertVerifier", "CertificateVerifierI"); + initData.properties.setProperty("IceSSL.CertVerifier", "test.IceSSL.configuration.CertificateVerifierI"); Ice.Communicator comm = Ice.Util.initialize(args, initData); IceSSL.Plugin plugin = (IceSSL.Plugin)comm.getPluginManager().getPlugin("IceSSL"); test(plugin != null); test(plugin.getCertificateVerifier() != null); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing protocols... "); - System.out.flush(); + out.print("testing protocols... "); + out.flush(); { // // This should fail because the client and server have no protocol @@ -586,7 +594,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); initData.properties.setProperty("IceSSL.Protocols", "ssl3"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); @@ -594,7 +602,7 @@ public class AllTests d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.VerifyPeer", "2"); d.put("IceSSL.Protocols", "tls1"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -619,7 +627,7 @@ public class AllTests // This should succeed. // comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); @@ -639,10 +647,10 @@ public class AllTests fact.destroyServer(server); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing expired certificates... "); - System.out.flush(); + out.print("testing expired certificates... "); + out.flush(); { // // This should fail because the server's certificate is expired. @@ -652,14 +660,14 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1_exp.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.VerifyPeer", "2"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -683,7 +691,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); @@ -711,24 +719,24 @@ public class AllTests fact.destroyServer(server); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing multiple CA certificates... "); - System.out.flush(); + out.print("testing multiple CA certificates... "); + out.flush(); { Ice.InitializationData initData = createClientProps(defaultProperties, defaultDir, defaultHost); initData.properties.setProperty("IceSSL.Keystore", "c_rsa_ca1.jks"); initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacerts.jks"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca2.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacerts.jks"); d.put("IceSSL.VerifyPeer", "2"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -740,10 +748,10 @@ public class AllTests fact.destroyServer(server); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing passwords... "); - System.out.flush(); + out.print("testing passwords... "); + out.flush(); { // // Test password failure. @@ -824,7 +832,7 @@ public class AllTests // Ice.InitializationData initData = createClientProps(defaultProperties, defaultDir, defaultHost); initData.properties.setProperty("IceSSL.Keystore", "c_rsa_ca1.jks"); - initData.properties.setProperty("IceSSL.PasswordCallback", "PasswordCallbackI"); + initData.properties.setProperty("IceSSL.PasswordCallback", "test.IceSSL.configuration.PasswordCallbackI"); Ice.Communicator comm = Ice.Util.initialize(args, initData); Ice.PluginManager pm = comm.getPluginManager(); IceSSL.Plugin plugin = (IceSSL.Plugin)pm.getPlugin("IceSSL"); @@ -832,10 +840,10 @@ public class AllTests test(plugin.getPasswordCallback() != null); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing ciphers... "); - System.out.flush(); + out.print("testing ciphers... "); + out.flush(); { // // The server has a certificate but the client doesn't. They should @@ -845,7 +853,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Ciphers", "NONE (.*DH_anon.*)"); initData.properties.setProperty("IceSSL.VerifyPeer", "0"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); @@ -853,7 +861,7 @@ public class AllTests d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.Ciphers", "ALL"); d.put("IceSSL.VerifyPeer", "1"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -876,14 +884,14 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.VerifyPeer", "1"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -903,7 +911,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); @@ -928,7 +936,7 @@ public class AllTests initData = createClientProps(defaultProperties, defaultDir, defaultHost); initData.properties.setProperty("IceSSL.Ciphers", "NONE (.*DH_anon.*)"); comm = Ice.Util.initialize(args, initData); - fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); @@ -966,14 +974,14 @@ public class AllTests initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); initData.properties.setProperty("IceSSL.Ciphers", "NONE (.*DSS.*)"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.VerifyPeer", "2"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1005,7 +1013,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); initData.properties.setProperty("IceSSL.Ciphers", "NONE (.*DSS.*)"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); @@ -1013,7 +1021,7 @@ public class AllTests d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.VerifyPeer", "2"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1034,10 +1042,10 @@ public class AllTests fact.destroyServer(server); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing IceSSL.TrustOnly... "); - System.out.flush(); + out.print("testing IceSSL.TrustOnly... "); + out.flush(); { Ice.InitializationData initData = createClientProps(defaultProperties, defaultDir, defaultHost); initData = createClientProps(defaultProperties, defaultDir, defaultHost); @@ -1047,13 +1055,13 @@ public class AllTests initData.properties.setProperty("IceSSL.TrustOnly", "C=US, ST=Florida, O=ZeroC\\, Inc.,OU=Ice, emailAddress=info@zeroc.com, CN=Server"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1072,7 +1080,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); @@ -1080,7 +1088,7 @@ public class AllTests d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.TrustOnly", "C=US, ST=Florida, O=ZeroC\\, Inc.,OU=Ice, emailAddress=info@zeroc.com, CN=Client"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1100,13 +1108,13 @@ public class AllTests initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); initData.properties.setProperty("IceSSL.TrustOnly", "CN=Server"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1125,14 +1133,14 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.TrustOnly", "CN=Client"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1152,13 +1160,13 @@ public class AllTests initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); initData.properties.setProperty("IceSSL.TrustOnly", "CN=Client"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1177,14 +1185,14 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.TrustOnly", "CN=Server"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1204,13 +1212,13 @@ public class AllTests initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); initData.properties.setProperty("IceSSL.TrustOnly", "C=Canada,CN=Server"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1230,13 +1238,13 @@ public class AllTests initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); initData.properties.setProperty("IceSSL.TrustOnly", "C=Canada;CN=Server"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1257,14 +1265,14 @@ public class AllTests initData.properties.setProperty("IceSSL.Ciphers", "NONE (.*DH_anon.*)"); initData.properties.setProperty("IceSSL.VerifyPeer", "0"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.TrustOnly", "C=US, ST=Florida, O=ZeroC\\, Inc.,OU=Ice, emailAddress=info@zeroc.com, CN=Client"); d.put("IceSSL.Ciphers", "NONE (.*DH_anon.*)"); d.put("IceSSL.VerifyPeer", "0"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1276,10 +1284,10 @@ public class AllTests fact.destroyServer(server); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing IceSSL.TrustOnly.Client... "); - System.out.flush(); + out.print("testing IceSSL.TrustOnly.Client... "); + out.flush(); { Ice.InitializationData initData = createClientProps(defaultProperties, defaultDir, defaultHost); initData = createClientProps(defaultProperties, defaultDir, defaultHost); @@ -1289,7 +1297,7 @@ public class AllTests initData.properties.setProperty("IceSSL.TrustOnly.Client", "C=US, ST=Florida, O=ZeroC\\, Inc.,OU=Ice, emailAddress=info@zeroc.com, CN=Server"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); @@ -1298,7 +1306,7 @@ public class AllTests // Should have no effect. d.put("IceSSL.TrustOnly.Client", "C=US, ST=Florida, O=ZeroC\\, Inc.,OU=Ice, emailAddress=info@zeroc.com, CN=Server"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1318,13 +1326,13 @@ public class AllTests initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); initData.properties.setProperty("IceSSL.TrustOnly.Client", "CN=Client"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1336,10 +1344,10 @@ public class AllTests fact.destroyServer(server); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing IceSSL.TrustOnly.Server... "); - System.out.flush(); + out.print("testing IceSSL.TrustOnly.Server... "); + out.flush(); { Ice.InitializationData initData = createClientProps(defaultProperties, defaultDir, defaultHost); initData = createClientProps(defaultProperties, defaultDir, defaultHost); @@ -1350,7 +1358,7 @@ public class AllTests initData.properties.setProperty("IceSSL.TrustOnly.Server", "C=US, ST=Florida, O=ZeroC\\, Inc.,OU=Ice, emailAddress=info@zeroc.com, CN=Client"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); @@ -1358,7 +1366,7 @@ public class AllTests d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.TrustOnly.Server", "C=US, ST=Florida, O=ZeroC\\, Inc.,OU=Ice, emailAddress=info@zeroc.com, CN=Client"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1377,14 +1385,14 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.TrustOnly.Server", "CN=Server"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1396,10 +1404,10 @@ public class AllTests fact.destroyServer(server); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); - System.out.print("testing IceSSL.TrustOnly.Server.<AdapterName>... "); - System.out.flush(); + out.print("testing IceSSL.TrustOnly.Server.<AdapterName>... "); + out.flush(); { Ice.InitializationData initData = createClientProps(defaultProperties, defaultDir, defaultHost); initData = createClientProps(defaultProperties, defaultDir, defaultHost); @@ -1407,7 +1415,7 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); @@ -1416,7 +1424,7 @@ public class AllTests d.put("IceSSL.TrustOnly.Server", "CN=bogus"); d.put("IceSSL.TrustOnly.Server.ServerAdapter", "C=US, ST=Florida, O=ZeroC\\, Inc.,OU=Ice, emailAddress=info@zeroc.com, CN=Client"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1435,14 +1443,14 @@ public class AllTests initData.properties.setProperty("IceSSL.Password", "password"); initData.properties.setProperty("IceSSL.Truststore", "cacert1.jks"); Ice.Communicator comm = Ice.Util.initialize(args, initData); - Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); + ServerFactoryPrx fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef)); test(fact != null); java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost); d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks"); d.put("IceSSL.Password", "password"); d.put("IceSSL.Truststore", "cacert1.jks"); d.put("IceSSL.TrustOnly.Server.ServerAdapter", "CN=bogus"); - Test.ServerPrx server = fact.createServer(d); + ServerPrx server = fact.createServer(d); try { server.ice_ping(); @@ -1454,7 +1462,7 @@ public class AllTests fact.destroyServer(server); comm.destroy(); } - System.out.println("ok"); + out.println("ok"); return factory; } |