billbarker 2003/12/17 21:19:47 Modified: util/java/org/apache/tomcat/util/net/jsse JSSESocketFactory.java Log: Adding a 'truststoreType' attribute, and making the trustStorePassword default to the keystorePass. Sort of fix for bug #25603. Revision Changes Path 1.12 +19 -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.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- JSSESocketFactory.java 6 Oct 2003 00:08:19 -0000 1.11 +++ JSSESocketFactory.java 18 Dec 2003 05:19:47 -0000 1.12 @@ -102,6 +102,8 @@ private static final String defaultKeystoreFile = System.getProperty("user.home") + "/.keystore"; private static final String defaultKeyPass = "changeit"; + static org.apache.commons.logging.Log log = + org.apache.commons.logging.LogFactory.getLog(JSSESocketFactory.class); protected boolean initialized; protected boolean clientAuth = false; @@ -269,12 +271,28 @@ if(trustStoreFile == null) { trustStoreFile = System.getProperty("javax.net.ssl.trustStore"); } + if(log.isDebugEnabled()) { + log.debug("Truststore = " + trustStoreFile); + } String trustStorePassword = (String)attributes.get("truststorePass"); if( trustStorePassword == null) { trustStorePassword = System.getProperty("javax.net.ssl.trustStorePassword"); } + if( trustStorePassword == null ) { + trustStorePassword = getKeystorePassword(); + } + if(log.isDebugEnabled()) { + log.debug("TrustPass = " + trustStorePassword); + } + String truststoreType = (String)attributes.get("truststoreType"); + if(truststoreType == null) { + truststoreType = keystoreType; + } + if(log.isDebugEnabled()) { + log.debug("trustType = " + truststoreType); + } if (trustStoreFile != null && trustStorePassword != null){ - trustStore = getStore(keystoreType, trustStoreFile, + trustStore = getStore(truststoreType, trustStoreFile, trustStorePassword); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]