luehe       2003/08/11 11:06:11

  Modified:    catalina/src/share/org/apache/coyote/tomcat5
                        CoyoteConnector.java CoyoteServerSocketFactory.java
                        mbeans-descriptors.xml
  Log:
  Added support for specifying alias name for server keypair and cert
  chain, to be used by the server to authenticate itself to SSL clients
  
  Revision  Changes    Path
  1.21      +32 -1     
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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- CoyoteConnector.java      6 Aug 2003 20:31:24 -0000       1.20
  +++ CoyoteConnector.java      11 Aug 2003 18:06:11 -0000      1.21
  @@ -1307,6 +1307,8 @@
                                              ssf.getSSLImplementation());
               IntrospectionUtils.setProperty(protocolHandler, "ciphers",
                                              ssf.getCiphers());
  +            IntrospectionUtils.setProperty(protocolHandler, "keyAlias",
  +                                           ssf.getKeyAlias());
           } else {
               IntrospectionUtils.setProperty(protocolHandler, "secure",
                                              "" + secure);
  @@ -1537,6 +1539,35 @@
           ServerSocketFactory factory = getFactory();
           if (factory instanceof CoyoteServerSocketFactory) {
               ((CoyoteServerSocketFactory)factory).setCiphers(ciphers);
  +        }
  +    }
  +
  +    /**
  +     * Gets the alias name of the keypair and supporting certificate chain
  +     * used by this Connector to authenticate itself to SSL clients.
  +     *
  +     * @return The alias name of the keypair and supporting certificate chain
  +     */
  +    public String getKeyAlias() {
  +        ServerSocketFactory factory = getFactory();
  +        if (factory instanceof CoyoteServerSocketFactory) {
  +            return ((CoyoteServerSocketFactory)factory).getKeyAlias();
  +        }
  +        return null;
  +    }
  +
  +    /**
  +     * Sets the alias name of the keypair and supporting certificate chain
  +     * used by this Connector to authenticate itself to SSL clients.
  +     *
  +     * @param alias The alias name of the keypair and supporting certificate
  +     * chain
  +     */
  +    public void setKeyAlias(String alias) {
  +        setProperty("keyAlias", alias);
  +        ServerSocketFactory factory = getFactory();
  +        if (factory instanceof CoyoteServerSocketFactory) {
  +            ((CoyoteServerSocketFactory)factory).setKeyAlias(alias);
           }
       }
   
  
  
  
  1.3       +22 -0     
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteServerSocketFactory.java
  
  Index: CoyoteServerSocketFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteServerSocketFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CoyoteServerSocketFactory.java    11 Jul 2003 01:04:43 -0000      1.2
  +++ CoyoteServerSocketFactory.java    11 Aug 2003 18:06:11 -0000      1.3
  @@ -115,6 +115,7 @@
       private String protocol = "TLS";
       private String sslImplementation = null;
       private String cipherSuites;
  +    private String keyAlias;
   
       // ------------------------------------------------------------- Properties
   
  @@ -294,6 +295,27 @@
        */
       public void setSSLImplementation(String sslImplementation) {
           this.sslImplementation = sslImplementation;
  +    }
  +
  +    /**
  +     * Gets the alias name of the keypair and supporting certificate chain
  +     * used by the server to authenticate itself to SSL clients.
  +     *
  +     * @return The alias name of the keypair and supporting certificate chain
  +     */
  +    public String getKeyAlias() {
  +        return this.keyAlias;
  +    }
  +
  +    /**
  +     * Sets the alias name of the keypair and supporting certificate chain
  +     * used by the server to authenticate itself to SSL clients.
  +     *
  +     * @param alias The alias name of the keypair and supporting certificate
  +     * chain
  +     */
  +    public void setKeyAlias(String alias) {
  +        this.keyAlias = alias;
       }
   
       /**
  
  
  
  1.4       +4 -0      
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/mbeans-descriptors.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mbeans-descriptors.xml    31 Jul 2003 00:19:42 -0000      1.3
  +++ mbeans-descriptors.xml    11 Aug 2003 18:06:11 -0000      1.4
  @@ -32,6 +32,10 @@
             description="Comma-separated list of SSL cipher suites to be enabled"
                    type="java.lang.String"/>
   
  +    <attribute   name="keyAlias"
  +          description="Alias name of this connector's keypair and supporting 
certificate chain"
  +                 type="java.lang.String"/>
  +
       <attribute   name="sslProtocol"
             description="SSL protocol variant to be used"
                    type="java.lang.String"/>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to