tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1559573 - /tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
Date Sun, 19 Jan 2014 19:57:16 GMT
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


Mime
View raw message