You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cr...@locus.apache.org on 2000/09/09 00:45:32 UTC
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Embedded.java
craigmcc 00/09/08 15:45:32
Modified: catalina/src/share/org/apache/catalina/startup Embedded.java
Log:
Reflect the changes just checked in for the server socket factory.
NOTE: If you ask createConnection() for a secure connection, it will set up
an SSLServerSocketFactory for you, with default values. To modify the defaults
you will need to acquire a reference to this object, and modify its properties,
before you start the connector. Code to do this might look like this:
Connector connector = embedded.createConnector(null, 443, true);
SSLServerSocketFactory factory =
(SSLServerSocketFactory) connector.getFactory();
factory.setClientAuth(true);
Revision Changes Path
1.2 +8 -17 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java
Index: Embedded.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Embedded.java 2000/08/11 23:38:41 1.1
+++ Embedded.java 2000/09/08 22:45:32 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v 1.1 2000/08/11 23:38:41 craigmcc Exp $
- * $Revision: 1.1 $
- * $Date: 2000/08/11 23:38:41 $
+ * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v 1.2 2000/09/08 22:45:32 craigmcc Exp $
+ * $Revision: 1.2 $
+ * $Date: 2000/09/08 22:45:32 $
*
* ====================================================================
*
@@ -87,6 +87,7 @@
import org.apache.catalina.core.StandardHost;
import org.apache.catalina.logger.FileLogger;
import org.apache.catalina.logger.SystemOutLogger;
+import org.apache.catalina.net.SSLServerSocketFactory;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
@@ -144,7 +145,7 @@
* </pre>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.1 $ $Date: 2000/08/11 23:38:41 $
+ * @version $Revision: 1.2 $ $Date: 2000/09/08 22:45:32 $
*/
public class Embedded implements Lifecycle {
@@ -456,11 +457,9 @@
* to listen on all address on this server
* @param port Port number to listen to
* @param secure Should this port be SSL-enabled?
- * @param props Connection properties to be passed to the underlying
- * socket factory, or <code>null</code> if no properties are required
*/
public Connector createConnector(InetAddress address, int port,
- boolean secure, Properties props) {
+ boolean secure) {
if (debug >= 1)
logger.log("Creating connector for address='" +
@@ -476,16 +475,8 @@
if (secure) {
connector.setScheme("https");
connector.setSecure(true);
- connector.setSocketFactory(socketFactory);
+ connector.setFactory(new SSLServerSocketFactory());
}
- if (props != null) {
- Enumeration names = props.keys();
- while (names.hasMoreElements()) {
- String name = (String) names.nextElement();
- String value = props.getProperty(name);
- connector.setParameter(name, value);
- }
- }
return (connector);
@@ -974,7 +965,7 @@
// Assemble and install a non-secure connector for port 8080
Connector connector =
- embedded.createConnector(null, 8080, false, null);
+ embedded.createConnector(null, 8080, false);
embedded.addConnector(connector);
// Pause for a while to allow brief testing