Summary: | keystoreFile parameter, when specified as relative, is not treated relative to $CATALINA_BASE or catalina.base property | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | Dominik Drzewiecki <drzewo> |
Component: | Connector:Coyote | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | critical | ||
Priority: | P3 | ||
Version: | 5.0.19 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP |
Description
Dominik Drzewiecki
2004-02-18 21:51:47 UTC
Fixed. DIFFS: Index: JSSESocketFactory.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java,v retrieving revision 1.13 diff -u -r1.13 JSSESocketFactory.java --- JSSESocketFactory.java 24 Jan 2004 04:56:32 -0000 1.13 +++ JSSESocketFactory.java 18 Feb 2004 22:39:36 -0000 @@ -58,6 +58,7 @@ */ package org.apache.tomcat.util.net.jsse; +import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; @@ -309,7 +310,13 @@ InputStream istream = null; try { ks = KeyStore.getInstance(type); - istream = new FileInputStream(path); + File keyStoreFile = new File(path); + if (!keyStoreFile.isAbsolute()) { + keyStoreFile = new File(System.getProperty("catalina.base"), + path); + } + istream = new FileInputStream(keyStoreFile); + ks.load(istream, pass.toCharArray()); istream.close(); istream = null; |