diff options
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); |