You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cr...@apache.org on 2001/09/07 20:39:08 UTC

cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs ssl-howto.xml

craigmcc    01/09/07 11:39:08

  Modified:    catalina/src/share/org/apache/catalina/net
                        SSLServerSocketFactory.java
               webapps/tomcat-docs ssl-howto.xml
  Log:
  Make it possible to specify either an absolute or relative (resolved
  against $CATALINA_BASE) path for the "keystoreFile" property.
  
  PR: Bugzilla #1237 (yes, it's ancient :-)
  
  Revision  Changes    Path
  1.5       +8 -2      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/net/SSLServerSocketFactory.java
  
  Index: SSLServerSocketFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/net/SSLServerSocketFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SSLServerSocketFactory.java	2001/07/22 20:25:11	1.4
  +++ SSLServerSocketFactory.java	2001/09/07 18:39:08	1.5
  @@ -92,7 +92,9 @@
    * <li><strong>clientAuth</strong> - Require client authentication if
    *     set to <code>true</code>. [false]</li>
    * <li><strong>keystoreFile</strong> - Pathname to the Key Store file to be
  - *     loaded. ["./keystore" in the user home directory]</li>
  + *     loaded.  This must be an absolute path, or a relative path that
  + *     is resolved against the "catalina.base" system property.
  + *     ["./keystore" in the user home directory]</li>
    * <li><strong>keystorePass</strong> - Password for the Key Store file to be
    *     loaded. ["changeit"]</li>
    * <li><strong>keystoreType</strong> - Type of the Key Store file to be
  @@ -193,7 +195,11 @@
       }
   
       public void setKeystoreFile(String keystoreFile) {
  -        this.keystoreFile = keystoreFile;
  +        File file = new File(keystoreFile);
  +        if (!file.isAbsolute())
  +            file = new File(System.getProperty("catalina.base"),
  +                            keystoreFile);
  +        this.keystoreFile = file.getAbsolutePath();
       }
   
   
  
  
  
  1.6       +3 -1      jakarta-tomcat-4.0/webapps/tomcat-docs/ssl-howto.xml
  
  Index: ssl-howto.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/ssl-howto.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ssl-howto.xml	2001/08/31 20:15:12	1.5
  +++ ssl-howto.xml	2001/09/07 18:39:08	1.6
  @@ -359,7 +359,9 @@
       <td>Add this attribute if the keystore file you created is not in
           the default place that Tomcat expects (a file named
           <code>.keystore</code> in the user home directory under
  -        which Tomcat is running).</td>
  +        which Tomcat is running).  You can specify an absolute pathname,
  +        or a relative pathname that is resolved against the
  +        <code>$CATALINA_BASE</code> environment variable.</td>
     </tr>
     <tr>
       <td><code>keystorePass</code></td>