billbarker 2003/08/02 20:19:08 Modified: catalina/src/share/org/apache/coyote/tomcat5 CoyoteConnector.java Log: Temporary fix for running SSL without a SocketFactory. This patch doesn't play well with JMX, but I'm intending to do a general JMX cleanup of the Connector next week, and will remove the method then. This is only so that I can commit server.xml and have it run. Revision Changes Path 1.19 +25 -8 jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteConnector.java Index: CoyoteConnector.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteConnector.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- CoyoteConnector.java 31 Jul 2003 00:19:42 -0000 1.18 +++ CoyoteConnector.java 3 Aug 2003 03:19:08 -0000 1.19 @@ -690,11 +690,6 @@ */ public ServerSocketFactory getFactory() { - if (this.factory == null) { - synchronized (this) { - this.factory = new DefaultServerSocketFactory(); - } - } return (this.factory); } @@ -1314,7 +1309,7 @@ ssf.getCiphers()); } else { IntrospectionUtils.setProperty(protocolHandler, "secure", - "" + false); + "" + secure); } /* Set the configured properties. This only sets the ones that were @@ -1325,7 +1320,8 @@ while( keys.hasNext() ) { String name = (String)keys.next(); String value = properties.get(name).toString(); - IntrospectionUtils.setProperty(protocolHandler, name, value); + String trnName = translateAttributeName(name); + IntrospectionUtils.setProperty(protocolHandler, trnName, value); } @@ -1336,6 +1332,27 @@ (sm.getString ("coyoteConnector.protocolHandlerInitializationFailed", e)); } + } + + /** + * Translate the attribute name from the legacy Factory names to their + * internal protocol names. + */ + private String translateAttributeName(String name) { + if("clientAuth".equals(name)) { + return "clientauth"; + } else if("keystoreFile".equals(name)) { + return "keystore"; + } else if("randomFile".equals(name)) { + return "randomfile"; + } else if("rootFile".equals(name)) { + return "rootfile"; + } else if("keystorePass".equals(name)) { + return "keypass"; + } else if("keystoreType".equals(name)) { + return "keytype"; + } + return name; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]