| 1 |
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 |
| 2 |
index 96fed75..1741218 100644 |
| 3 |
--- a/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLImplementation.java |
| 4 |
+++ b/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLImplementation.java |
| 5 |
@@ -1,7 +1,6 @@ |
| 6 |
package org.globus.gsi.tomcat; |
| 7 |
|
| 8 |
|
| 9 |
-import org.apache.tomcat.util.net.AbstractEndpoint; |
| 10 |
import org.apache.tomcat.util.net.ServerSocketFactory; |
| 11 |
import org.apache.tomcat.util.net.jsse.JSSEImplementation; |
| 12 |
|
| 13 |
@@ -15,8 +14,8 @@ public class GlobusSSLImplementation extends JSSEImplementation { |
| 14 |
return "GlobusSSLImplementation"; |
| 15 |
} |
| 16 |
|
| 17 |
- public ServerSocketFactory getServerSocketFactory(AbstractEndpoint endpoint) { |
| 18 |
- return new GlobusSSLSocketFactory(endpoint); |
| 19 |
+ public ServerSocketFactory getServerSocketFactory() { |
| 20 |
+ return new GlobusSSLSocketFactory(); |
| 21 |
} |
| 22 |
|
| 23 |
} |
| 24 |
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 |
| 25 |
index 3718fa3..74ef715 100644 |
| 26 |
--- a/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLSocketFactory.java |
| 27 |
+++ b/ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLSocketFactory.java |
| 28 |
@@ -15,8 +15,7 @@ |
| 29 |
|
| 30 |
package org.globus.gsi.tomcat; |
| 31 |
|
| 32 |
-import org.apache.tomcat.util.net.AbstractEndpoint; |
| 33 |
-import org.apache.tomcat.util.net.jsse.JSSESocketFactory; |
| 34 |
+import org.apache.tomcat.util.net.jsse.JSSE14SocketFactory; |
| 35 |
import org.globus.gsi.X509ProxyCertPathParameters; |
| 36 |
import org.globus.gsi.jsse.GlobusSSLHelper; |
| 37 |
import org.globus.gsi.provider.GlobusProvider; |
| 38 |
@@ -41,58 +40,12 @@ import java.security.cert.CertStore; |
| 39 |
* @version 1.0 |
| 40 |
* @since 1.0 |
| 41 |
*/ |
| 42 |
-public class GlobusSSLSocketFactory extends JSSESocketFactory { |
| 43 |
+public class GlobusSSLSocketFactory extends JSSE14SocketFactory { |
| 44 |
|
| 45 |
static { |
| 46 |
Security.addProvider(new GlobusProvider()); |
| 47 |
} |
| 48 |
|
| 49 |
- protected Object crlLocation; |
| 50 |
- protected Object signingPolicyLocation; |
| 51 |
- protected Object rejectLimitedProxyEntry; |
| 52 |
- |
| 53 |
- public GlobusSSLSocketFactory(AbstractEndpoint endpoint) { |
| 54 |
- super(endpoint); |
| 55 |
- crlLocation = endpoint.getAttribute("crlLocation"); |
| 56 |
- signingPolicyLocation = endpoint.getAttribute("signingPolicyLocation"); |
| 57 |
- rejectLimitedProxyEntry = endpoint.getAttribute("rejectLimitedProxy"); |
| 58 |
- } |
| 59 |
- |
| 60 |
- /** |
| 61 |
- * Create a Globus trust manager which supports proxy certificates. This requires that the CRL store, and |
| 62 |
- * signing policy store be configured. |
| 63 |
- * |
| 64 |
- * @param keystoreType The type of keystore to create. |
| 65 |
- * @param keystoreProvider The keystore provider to use. |
| 66 |
- * @param algorithm The keystore algorithm. |
| 67 |
- * @return A set of configured TrustManagers. |
| 68 |
- * @throws Exception If we cannot create the trust managers. |
| 69 |
- */ |
| 70 |
- @Override |
| 71 |
- protected TrustManager[] getTrustManagers(String keystoreType, String keystoreProvider, String algorithm) |
| 72 |
- throws Exception { |
| 73 |
- KeyStore trustStore = getTrustStore(keystoreType, keystoreProvider); |
| 74 |
- |
| 75 |
- CertStore crlStore = null; |
| 76 |
- if (crlLocation != null) { |
| 77 |
- crlStore = GlobusSSLHelper.findCRLStore((String) crlLocation); |
| 78 |
- } |
| 79 |
- |
| 80 |
- ResourceSigningPolicyStore policyStore = null; |
| 81 |
- if (signingPolicyLocation != null) { |
| 82 |
- policyStore = Stores.getSigningPolicyStore((String) signingPolicyLocation); |
| 83 |
- } |
| 84 |
- |
| 85 |
- boolean rejectLimitedProxy = rejectLimitedProxyEntry != null && |
| 86 |
- Boolean.parseBoolean((String) rejectLimitedProxyEntry); |
| 87 |
- |
| 88 |
- X509ProxyCertPathParameters parameters = new X509ProxyCertPathParameters(trustStore, crlStore, policyStore, |
| 89 |
- rejectLimitedProxy); |
| 90 |
- TrustManager trustManager = new PKITrustManager(new X509ProxyCertPathValidator(), parameters); |
| 91 |
- return new TrustManager[]{trustManager}; |
| 92 |
- } |
| 93 |
- |
| 94 |
- |
| 95 |
@Override |
| 96 |
protected Object clone() throws CloneNotSupportedException { |
| 97 |
// TODO Auto-generated method stub |