You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/01/19 20:57:16 UTC
svn commit: r1559573 -
/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
Author: markt
Date: Sun Jan 19 19:57:16 2014
New Revision: 1559573
URL: http://svn.apache.org/r1559573
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56021
Make it possible to use the Windows-My keystore that requires keystoreFile="" to be set on the connector.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1559573&r1=1559572&r2=1559573&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Sun Jan 19 19:57:16 2014
@@ -753,6 +753,11 @@ public abstract class AbstractEndpoint<S
public String adjustRelativePath(String path, String relativeTo) {
+ // Empty or null path can't point to anything useful. The assumption is
+ // that the value is deliberately empty / null so leave it that way.
+ if (path == null || path.length() == 0) {
+ return path;
+ }
String newPath = path;
File f = new File(newPath);
if ( !f.isAbsolute()) {
@@ -851,9 +856,8 @@ public abstract class AbstractEndpoint<S
private String keystoreFile = System.getProperty("user.home")+"/.keystore";
public String getKeystoreFile() { return keystoreFile;}
public void setKeystoreFile(String s ) {
- String file = adjustRelativePath(s,
+ keystoreFile = adjustRelativePath(s,
System.getProperty(Constants.CATALINA_BASE_PROP));
- this.keystoreFile = file;
}
private String keystorePass = null;
@@ -903,13 +907,8 @@ public abstract class AbstractEndpoint<S
private String truststoreFile = System.getProperty("javax.net.ssl.trustStore");
public String getTruststoreFile() {return truststoreFile;}
public void setTruststoreFile(String s) {
- if (s == null) {
- this.truststoreFile = null;
- } else {
- String file = adjustRelativePath(s,
- System.getProperty(Constants.CATALINA_BASE_PROP));
- this.truststoreFile = file;
- }
+ truststoreFile = adjustRelativePath(s,
+ System.getProperty(Constants.CATALINA_BASE_PROP));
}
private String truststorePass =
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org