[utilities COMMIT] in /tomcat6-dta-ssl/trunk: pom.xml src/main/java/edu/internet2/middleware/security/tomcat6/Delegat...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Jul 7 19:10:16 EDT 2015
Author: tzeller
Date: Tue Jul 7 19:10:15 2015
New Revision: 806
URL: http://svn.shibboleth.net/view/utilities?rev=806&view=rev
Log:
SIDP-627 - Apply patch to support Tomcat 6.0.43.
Apply contributed tomcat6dtassl-tomcat6043r2.patch.
https://issues.shibboleth.net/jira/browse/SIDP-627
Modified:
tomcat6-dta-ssl/trunk/pom.xml
tomcat6-dta-ssl/trunk/src/main/java/edu/internet2/middleware/security/tomcat6/DelegateToApplicationJSSEImplementation.java
Modified: tomcat6-dta-ssl/trunk/pom.xml
URL: http://svn.shibboleth.net/view/utilities/tomcat6-dta-ssl/trunk/pom.xml?rev=806&r1=805&r2=806&view=diff
==============================================================================
--- tomcat6-dta-ssl/trunk/pom.xml (original)
+++ tomcat6-dta-ssl/trunk/pom.xml Tue Jul 7 19:10:15 2015
@@ -12,7 +12,7 @@
<groupId>edu.internet2.middleware.security.tomcat6</groupId>
<artifactId>tomcat6-dta-ssl</artifactId>
- <version>1.1-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Tomcat Delegate To Application Protocol and JSSE Implementation</name>
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>coyote</artifactId>
- <version>6.0.24</version>
+ <version>6.0.43</version>
<scope>provided</scope>
</dependency>
Modified: tomcat6-dta-ssl/trunk/src/main/java/edu/internet2/middleware/security/tomcat6/DelegateToApplicationJSSEImplementation.java
URL: http://svn.shibboleth.net/view/utilities/tomcat6-dta-ssl/trunk/src/main/java/edu/internet2/middleware/security/tomcat6/DelegateToApplicationJSSEImplementation.java?rev=806&r1=805&r2=806&view=diff
==============================================================================
--- tomcat6-dta-ssl/trunk/src/main/java/edu/internet2/middleware/security/tomcat6/DelegateToApplicationJSSEImplementation.java (original)
+++ tomcat6-dta-ssl/trunk/src/main/java/edu/internet2/middleware/security/tomcat6/DelegateToApplicationJSSEImplementation.java Tue Jul 7 19:10:15 2015
@@ -18,6 +18,8 @@
package edu.internet2.middleware.security.tomcat6;
import java.security.cert.X509Certificate;
+import java.util.HashMap;
+import java.util.Map;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
@@ -40,7 +42,7 @@
private static Log log = LogFactory.getLog(DelegateToApplicationJSSEImplementation.class);
/** The 'trust any cert' socket factory */
- private NoTrustSocketFactory socketFactory = null;
+ private Map<String, NoTrustSocketFactory> socketFactories = new HashMap<String, NoTrustSocketFactory>();
/**
* Constructor.
@@ -49,7 +51,6 @@
*/
public DelegateToApplicationJSSEImplementation() throws ClassNotFoundException {
super();
- socketFactory = new NoTrustSocketFactory();
log.debug("Loaded DelegateToApplicationJSSEImplementation");
}
@@ -60,7 +61,14 @@
/** {@inheritDoc} */
public ServerSocketFactory getServerSocketFactory() {
- return socketFactory;
+ return getServerSocketFactory(null);
+ }
+
+ /** {@inheritDoc} */
+ public ServerSocketFactory getServerSocketFactory(String sslProtocol) {
+ if (!socketFactories.containsKey(sslProtocol))
+ socketFactories.put(sslProtocol, sslProtocol != null ? new NoTrustSocketFactory(sslProtocol) : new NoTrustSocketFactory());
+ return socketFactories.get(sslProtocol);
}
/** {@link JSSESocketFactory} that accepts any certificate presented. */
@@ -69,10 +77,7 @@
/** Trust manager */
private TrustManager[] trustManagers;
- /** Constructor. */
- public NoTrustSocketFactory() {
- super();
-
+ {
X509TrustManager noTrustManager = new X509TrustManager() {
/** {@inheritDoc} */
@@ -95,6 +100,16 @@
trustManagers = new TrustManager[] { noTrustManager };
}
+ /** Constructor. */
+ public NoTrustSocketFactory() {
+ super();
+ }
+
+ /** Constructor. */
+ public NoTrustSocketFactory(String sslProtocol) {
+ super(sslProtocol);
+ }
+
/** {@inheritDoc} */
protected TrustManager[] getTrustManagers(String arg0, String arg1, String arg2) throws Exception {
return trustManagers;
More information about the commits
mailing list