You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by lu...@apache.org on 2004/02/18 23:42:22 UTC
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse JSSESocketFactory.java
luehe 2004/02/18 14:42:22
Modified: util/java/org/apache/tomcat/util/net/jsse
JSSESocketFactory.java
Log:
Fixed Bugzilla 27050 ("keystoreFile parameter, when specified as
relative, is not treated relative to $CATALINA_BASE or catalina.base
property")
Revision Changes Path
1.14 +8 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
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
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- JSSESocketFactory.java 24 Jan 2004 04:56:32 -0000 1.13
+++ JSSESocketFactory.java 18 Feb 2004 22:42:22 -0000 1.14
@@ -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;
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org