summaryrefslogtreecommitdiff
path: root/java/test
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2007-06-26 10:22:00 -0700
committerMark Spruiell <mes@zeroc.com>2007-06-26 10:22:00 -0700
commitbdd7b47ab37973ed6cdd192c126901aa823ed1b0 (patch)
tree017d90475d8922065b753068d620831670dc1a40 /java/test
parentMerge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff)
downloadice-bdd7b47ab37973ed6cdd192c126901aa823ed1b0.tar.bz2
ice-bdd7b47ab37973ed6cdd192c126901aa823ed1b0.tar.xz
ice-bdd7b47ab37973ed6cdd192c126901aa823ed1b0.zip
fixing NPE in IceSSL for Java & updating IceSSL test
Diffstat (limited to 'java/test')
-rw-r--r--java/test/IceSSL/configuration/AllTests.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/java/test/IceSSL/configuration/AllTests.java b/java/test/IceSSL/configuration/AllTests.java
index 96d3444dcaa..edf27399047 100644
--- a/java/test/IceSSL/configuration/AllTests.java
+++ b/java/test/IceSSL/configuration/AllTests.java
@@ -1224,6 +1224,34 @@ public class AllTests
fact.destroyServer(server);
comm.destroy();
}
+ {
+ //
+ // Test rejection when client does not supply a certificate.
+ //
+ Ice.InitializationData initData = createClientProps(defaultDir, defaultHost, threadPool);
+ initData = createClientProps(defaultDir, defaultHost, threadPool);
+ 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));
+ test(fact != null);
+ java.util.Map d = createServerProps(defaultDir, defaultHost, threadPool);
+ 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);
+ try
+ {
+ server.ice_ping();
+ test(false);
+ }
+ catch(Ice.LocalException ex)
+ {
+ }
+ fact.destroyServer(server);
+ comm.destroy();
+ }
System.out.println("ok");
System.out.print("testing IceSSL.TrustOnly.Client... ");