diff options
author | Mark Spruiell <mes@zeroc.com> | 2015-05-01 16:30:59 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2015-05-01 16:30:59 -0700 |
commit | 3eb8fc5fa86df80997d858d96f8c9fd2eb869c53 (patch) | |
tree | c70abf2c0db8c067ed11ec48cf2c3287fdfe4f6f /java/src | |
parent | fix for C# log message (diff) | |
download | ice-3eb8fc5fa86df80997d858d96f8c9fd2eb869c53.tar.bz2 ice-3eb8fc5fa86df80997d858d96f8c9fd2eb869c53.tar.xz ice-3eb8fc5fa86df80997d858d96f8c9fd2eb869c53.zip |
ICE-6410 - Java error with empty truststore
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/Ice/src/main/java/IceSSL/SSLEngine.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/java/src/Ice/src/main/java/IceSSL/SSLEngine.java b/java/src/Ice/src/main/java/IceSSL/SSLEngine.java index daf4efdbc12..50380938751 100644 --- a/java/src/Ice/src/main/java/IceSSL/SSLEngine.java +++ b/java/src/Ice/src/main/java/IceSSL/SSLEngine.java @@ -566,6 +566,19 @@ class SSLEngine { trustStore = null; } + + // + // Attempting to establish an outgoing connection with an empty truststore can + // cause hangs that eventually result in an exception such as: + // + // java.security.InvalidAlgorithmParameterException: the trustAnchors parameter + // must be non-empty + // + if(trustStore != null && trustStore.size() == 0) + { + throw new Ice.PluginInitializationException("IceSSL: truststore is empty"); + } + if(trustManagers == null) { tmf.init(trustStore); |