diff --git a/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLImplementation.java b/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLImplementation.java index 96fed75..1741218 100644 --- a/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLImplementation.java +++ b/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLImplementation.java @@ -1,7 +1,6 @@ package org.globus.gsi.tomcat; -import org.apache.tomcat.util.net.AbstractEndpoint; import org.apache.tomcat.util.net.ServerSocketFactory; import org.apache.tomcat.util.net.jsse.JSSEImplementation; @@ -15,8 +14,8 @@ public class GlobusSSLImplementation extends JSSEImplementation { return "GlobusSSLImplementation"; } - public ServerSocketFactory getServerSocketFactory(AbstractEndpoint endpoint) { - return new GlobusSSLSocketFactory(endpoint); + public ServerSocketFactory getServerSocketFactory() { + return new GlobusSSLSocketFactory(); } } diff --git a/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLSocketFactory.java b/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLSocketFactory.java index 3718fa3..74ef715 100644 --- a/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLSocketFactory.java +++ b/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLSocketFactory.java @@ -15,8 +15,7 @@ package org.globus.gsi.tomcat; -import org.apache.tomcat.util.net.AbstractEndpoint; -import org.apache.tomcat.util.net.jsse.JSSESocketFactory; +import org.apache.tomcat.util.net.jsse.JSSE14SocketFactory; import org.globus.gsi.X509ProxyCertPathParameters; import org.globus.gsi.jsse.GlobusSSLHelper; import org.globus.gsi.provider.GlobusProvider; @@ -41,58 +40,12 @@ import java.security.cert.CertStore; * @version 1.0 * @since 1.0 */ -public class GlobusSSLSocketFactory extends JSSESocketFactory { +public class GlobusSSLSocketFactory extends JSSE14SocketFactory { static { Security.addProvider(new GlobusProvider()); } - protected Object crlLocation; - protected Object signingPolicyLocation; - protected Object rejectLimitedProxyEntry; - - public GlobusSSLSocketFactory(AbstractEndpoint endpoint) { - super(endpoint); - crlLocation = endpoint.getAttribute("crlLocation"); - signingPolicyLocation = endpoint.getAttribute("signingPolicyLocation"); - rejectLimitedProxyEntry = endpoint.getAttribute("rejectLimitedProxy"); - } - - /** - * Create a Globus trust manager which supports proxy certificates. This requires that the CRL store, and - * signing policy store be configured. - * - * @param keystoreType The type of keystore to create. - * @param keystoreProvider The keystore provider to use. - * @param algorithm The keystore algorithm. - * @return A set of configured TrustManagers. - * @throws Exception If we cannot create the trust managers. - */ - @Override - protected TrustManager[] getTrustManagers(String keystoreType, String keystoreProvider, String algorithm) - throws Exception { - KeyStore trustStore = getTrustStore(keystoreType, keystoreProvider); - - CertStore crlStore = null; - if (crlLocation != null) { - crlStore = GlobusSSLHelper.findCRLStore((String) crlLocation); - } - - ResourceSigningPolicyStore policyStore = null; - if (signingPolicyLocation != null) { - policyStore = Stores.getSigningPolicyStore((String) signingPolicyLocation); - } - - boolean rejectLimitedProxy = rejectLimitedProxyEntry != null && - Boolean.parseBoolean((String) rejectLimitedProxyEntry); - - X509ProxyCertPathParameters parameters = new X509ProxyCertPathParameters(trustStore, crlStore, policyStore, - rejectLimitedProxy); - TrustManager trustManager = new PKITrustManager(new X509ProxyCertPathValidator(), parameters); - return new TrustManager[]{trustManager}; - } - - @Override protected Object clone() throws CloneNotSupportedException { // TODO Auto-generated method stub