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/06/06 04:46:41 UTC
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves CertificatesValve.java
billbarker 2003/06/05 19:46:41
Modified: catalina/src/share/org/apache/catalina/startup
ContextConfig.java
Removed: catalina/src/share/org/apache/catalina/valves
CertificatesValve.java
Log:
Removing CertificatesValve, since the HttpConnector isn't supported here.
It doesn't do anything with the CoyoteConnector, and could cause problems trying to use Tomcat with a non-Sun 1.4 JVM.
Revision Changes Path
1.26 +1 -81 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
Index: ContextConfig.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- ContextConfig.java 14 May 2003 17:42:55 -0000 1.25
+++ ContextConfig.java 6 Jun 2003 02:46:41 -0000 1.26
@@ -445,82 +445,6 @@
}
-
- /**
- * Create and deploy a Valve to expose the SSL certificates presented
- * by this client, if any. If we cannot instantiate such a Valve
- * (because the JSSE classes are not available), silently continue.
- * This is only instantiated for those Contexts being served by
- * a Connector with secure set to true.
- */
- private void certificatesConfig() {
-
- // Only install this valve if there is a Connector installed
- // which has secure set to true.
- boolean secure = false;
- Container container = context.getParent();
- if (container instanceof Host) {
- xmlValidation = ((Host)container).getXmlValidation();
- xmlNamespaceAware = ((Host)container).getXmlNamespaceAware();
- container = container.getParent();
- }
- if (container instanceof Engine) {
- Service service = ((Engine)container).getService();
- // The service can be null when Tomcat is run in embedded mode
- if (service == null) {
- secure = true;
- } else {
- Connector [] connectors = service.findConnectors();
- for (int i = 0; i < connectors.length; i++) {
- secure = connectors[i].getSecure();
- if (secure) {
- break;
- }
- }
- }
- }
- if (!secure) {
- return;
- }
-
- // Validate that the JSSE classes are present
- try {
- Class clazz = this.getClass().getClassLoader().loadClass
- ("javax.net.ssl.SSLSocket");
- if (clazz == null)
- return;
- } catch (Throwable t) {
- return;
- }
-
- // Instantiate a new CertificatesValve if possible
- Valve certificates = null;
- try {
- Class clazz =
- Class.forName("org.apache.catalina.valves.CertificatesValve");
- certificates = (Valve) clazz.newInstance();
- } catch (Throwable t) {
- return; // Probably JSSE classes not present
- }
-
- // Add this Valve to our Pipeline
- try {
- if (context instanceof ContainerBase) {
- Pipeline pipeline = ((ContainerBase) context).getPipeline();
- if (pipeline != null) {
- ((ContainerBase) context).addValve(certificates);
- log.info(sm.getString
- ("contextConfig.certificatesConfig.added"));
-
- }
- }
- } catch (Throwable t) {
- log.error(sm.getString("contextConfig.certificatesConfig.error"), t);
- ok = false;
- }
-
- }
-
private static Digester patchXerces(Digester digester){
// This feature is needed for backward compatibility with old DDs
// which used Java encoding names such as ISO8859_1 etc.
@@ -799,10 +723,6 @@
if (ok) {
validateSecurityRoles();
}
-
- // Configure a certificates exposer valve, if required
- if (ok)
- certificatesConfig();
// Configure an authenticator if we need one
if (ok)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org