You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bi...@apache.org on 2003/10/11 06:24:30 UTC
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse JSSE13SocketFactory.java JSSE14SocketFactory.java
billbarker 2003/10/10 21:24:30
Modified: util/java/org/apache/tomcat/util/net/jsse
JSSE13SocketFactory.java JSSE14SocketFactory.java
Log:
Allow the TrustStore to have a different type from the KeyStore.
Probably a small minority case, but it can be useful when moving from Apache to Tomcat-Standalone.
Revision Changes Path
1.6 +5 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE13SocketFactory.java
Index: JSSE13SocketFactory.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE13SocketFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JSSE13SocketFactory.java 2 Sep 2003 21:34:38 -0000 1.5
+++ JSSE13SocketFactory.java 11 Oct 2003 04:24:30 -0000 1.6
@@ -131,7 +131,11 @@
// Set up TrustManager
com.sun.net.ssl.TrustManager[] tm = null;
- KeyStore trustStore = getTrustStore(keystoreType);
+ String truststoreType = (String)attributes.get("truststoreType");
+ if(truststoreType == null) {
+ truststoreType = keystoreType;
+ }
+ KeyStore trustStore = getTrustStore(truststoreType);
if (trustStore != null) {
com.sun.net.ssl.TrustManagerFactory tmf =
com.sun.net.ssl.TrustManagerFactory.getInstance("SunX509");
1.16 +5 -1 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE14SocketFactory.java
Index: JSSE14SocketFactory.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE14SocketFactory.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- JSSE14SocketFactory.java 27 Sep 2003 02:44:07 -0000 1.15
+++ JSSE14SocketFactory.java 11 Oct 2003 04:24:30 -0000 1.16
@@ -186,7 +186,11 @@
TrustManager[] tms = null;
- KeyStore trustStore = getTrustStore(keystoreType);
+ String truststoreType = (String)attributes.get("truststoreType");
+ if(truststoreType == null) {
+ truststoreType = keystoreType;
+ }
+ KeyStore trustStore = getTrustStore(truststoreType);
if (trustStore != null) {
TrustManagerFactory tmf = TrustManagerFactory.getInstance(algorithm);
tmf.init(trustStore);
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org