From: markt Date: Tue, 13 May 2008 22:32:17 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44968 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a7caafccaed3e1965ca1df11c48a089599569d42;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44968 Provide more information when keystore load fails git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@656035 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java b/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java index 9538edbac..337d60008 100644 --- a/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java +++ b/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java @@ -321,13 +321,18 @@ public class JSSESocketFactory ks.load(istream, pass.toCharArray()); } catch (FileNotFoundException fnfe) { + log.error(sm.getString("jsse.keystore_load_failed", type, path, + fnfe.getMessage())); throw fnfe; } catch (IOException ioe) { + log.error(sm.getString("jsse.keystore_load_failed", type, path, + ioe.getMessage())); throw ioe; } catch(Exception ex) { - log.error("Exception trying to load keystore " +path,ex); - throw new IOException("Exception trying to load keystore " + - path + ": " + ex.getMessage() ); + String msg = sm.getString("jsse.keystore_load_failed", type, path, + ex.getMessage()); + log.error(msg); + throw new IOException(msg); } finally { if (istream != null) { try { diff --git a/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties b/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties index 0b0bea8ec..79c34c4a5 100644 --- a/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties +++ b/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties @@ -14,3 +14,4 @@ # limitations under the License. jsse.alias_no_key_entry=Alias name {0} does not identify a key entry +jsse.keystore_load_failed=Failed to load keystore type {0} with path {1} due to {2}