summaryrefslogtreecommitdiff
path: root/java/test/IceSSL/configuration/AllTests.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2009-07-21 10:07:40 -0700
committerMark Spruiell <mes@zeroc.com>2009-07-21 10:07:40 -0700
commit073d26ba7398f2b623f6b3f589c2b586119587ea (patch)
tree32a8992a0faf9e3bc5c36605ee6002815bd28ba7 /java/test/IceSSL/configuration/AllTests.java
parentBug 3502 - Improve javadoc support in Eclipse (diff)
downloadice-073d26ba7398f2b623f6b3f589c2b586119587ea.tar.bz2
ice-073d26ba7398f2b623f6b3f589c2b586119587ea.tar.xz
ice-073d26ba7398f2b623f6b3f589c2b586119587ea.zip
bug 3267 - C++/Java fixes for IceSSL.VerifyPeer
Diffstat (limited to 'java/test/IceSSL/configuration/AllTests.java')
-rw-r--r--java/test/IceSSL/configuration/AllTests.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/java/test/IceSSL/configuration/AllTests.java b/java/test/IceSSL/configuration/AllTests.java
index 3711ddffa24..4fc9da0fb31 100644
--- a/java/test/IceSSL/configuration/AllTests.java
+++ b/java/test/IceSSL/configuration/AllTests.java
@@ -227,6 +227,32 @@ public class AllTests
comm.destroy();
//
+ // Test IceSSL.VerifyPeer=0. This should succeed even though the client
+ // does not trust the server's certificate.
+ //
+ initData = createClientProps(defaultProperties, defaultDir, defaultHost);
+ initData.properties.setProperty("IceSSL.VerifyPeer", "0");
+ comm = Ice.Util.initialize(args, initData);
+ fact = ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
+ test(fact != null);
+ 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");
+ server = fact.createServer(d);
+ try
+ {
+ server.ice_ping();
+ }
+ catch(Ice.LocalException ex)
+ {
+ test(false);
+ }
+ fact.destroyServer(server);
+ comm.destroy();
+
+ //
// Test IceSSL.VerifyPeer=1. This should fail because the server
// does not supply a certificate.
//