billbarker    2004/01/23 23:21:04

  Modified:    catalina/src/share/org/apache/coyote/tomcat5
                        CoyoteConnector.java CoyoteServerSocketFactory.java
                        mbeans-descriptors.xml
  Log:
  Add support for the new values of clientAuth.
  
  Revision  Changes    Path
  1.37      +8 -10     
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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- CoyoteConnector.java      22 Jan 2004 18:27:04 -0000      1.36
  +++ CoyoteConnector.java      24 Jan 2004 07:21:04 -0000      1.37
  @@ -1398,10 +1398,8 @@
                   (CoyoteServerSocketFactory) factory;
               IntrospectionUtils.setProperty(protocolHandler, "algorithm",
                                              ssf.getAlgorithm());
  -            if (ssf.getClientAuth()) {
  -                IntrospectionUtils.setProperty(protocolHandler, "clientauth",
  -                                               "" + ssf.getClientAuth());
  -            }
  +            IntrospectionUtils.setProperty(protocolHandler, "clientauth",
  +                                           ssf.getClientAuth());
               IntrospectionUtils.setProperty(protocolHandler, "keystore",
                                              ssf.getKeystoreFile());
               IntrospectionUtils.setProperty(protocolHandler, "randomfile",
  @@ -1573,12 +1571,12 @@
       // -------------------- Management methods --------------------
   
       
  -    public boolean getClientAuth() {
  -        boolean ret = false;
  +    public String getClientAuth() {
  +        String ret = "false";
   
           String prop = (String) getProperty("clientauth");
           if (prop != null) {
  -            ret = Boolean.valueOf(prop).booleanValue();
  +            ret = prop;
           } else {     
               ServerSocketFactory factory = this.getFactory();
               if (factory instanceof CoyoteServerSocketFactory) {
  @@ -1589,8 +1587,8 @@
           return ret;
       }
   
  -    public void setClientAuth(boolean clientAuth) {
  -        setProperty("clientauth", String.valueOf(clientAuth));
  +    public void setClientAuth(String clientAuth) {
  +        setProperty("clientauth", clientAuth);
           ServerSocketFactory factory = this.getFactory();
           if (factory instanceof CoyoteServerSocketFactory) {
               ((CoyoteServerSocketFactory)factory).setClientAuth(clientAuth);
  
  
  
  1.6       +9 -5      
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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CoyoteServerSocketFactory.java    2 Sep 2003 21:21:59 -0000       1.5
  +++ CoyoteServerSocketFactory.java    24 Jan 2004 07:21:04 -0000      1.6
  @@ -94,7 +94,7 @@
       implements org.apache.catalina.net.ServerSocketFactory {
   
       private String algorithm = null;
  -    private boolean clientAuth = false;
  +    private String clientAuth = "false";
       private String keystoreFile =
           System.getProperty("user.home") + File.separator + ".keystore";
       private String randomFile =
  @@ -132,19 +132,23 @@
       /**
        * Provides information about whether client authentication is enforced.
        *
  -     * @return true if client authentication is enforced, false otherwise
  +     * @return <code>true</code> if client authentication is enforced, 
  +     *         <code>want</code> if client authentication is desired,
  +     *         <code>false</code> otherwise
        */
  -    public boolean getClientAuth() {
  +    public String getClientAuth() {
           return (this.clientAuth);
       }
   
       /**
        * Sets the requirement of client authentication.
        *
  -     * @param clientAuth true if client authentication is enforced, false
  +     * @param clientAuth <code>true</code> if client authentication is enforced, 
  +     *                   <code>want</code> if client authentication is desired,
  +     *                   <code>false</code>
        * otherwise
        */
  -    public void setClientAuth(boolean clientAuth) {
  +    public void setClientAuth(String clientAuth) {
           this.clientAuth = clientAuth;
       }
   
  
  
  
  1.14      +1 -1      
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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mbeans-descriptors.xml    22 Jan 2004 18:27:04 -0000      1.13
  +++ mbeans-descriptors.xml    24 Jan 2004 07:21:04 -0000      1.14
  @@ -35,7 +35,7 @@
   
       <attribute   name="clientAuth"
             description="Should we require client authentication?"
  -                 type="boolean"/>
  +                 type="String"/>
   
       <attribute   name="ciphers"
             description="Comma-separated list of SSL cipher suites to be enabled"
  
  
  

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

Reply via email to