billbarker    2002/09/22 17:12:26

  Modified:    coyote/src/java/org/apache/coyote/tomcat4 Constants.java
                        CoyoteRequest.java
  Log:
  Porting SSL-auth fix from Tomcat5.
  
  Revision  Changes    Path
  1.4       +5 -0      
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/Constants.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Constants.java    31 Jan 2002 18:42:29 -0000      1.3
  +++ Constants.java    23 Sep 2002 00:12:26 -0000      1.4
  @@ -82,4 +82,9 @@
        */
       public static final String AUTHORIZATION_HEADER = "authorization";
   
  +    /**
  +     * SSL Certificate Request Attributite.
  +     */
  +    public static final String SSL_CERTIFICATE_ATTR = 
"org.apache.coyote.request.X509Certificate";
  +
   }
  
  
  
  1.26      +18 -9     
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- CoyoteRequest.java        11 Jul 2002 08:33:22 -0000      1.25
  +++ CoyoteRequest.java        23 Sep 2002 00:12:26 -0000      1.26
  @@ -784,14 +784,23 @@
        * @param name Name of the request attribute to return
        */
       public Object getAttribute(String name) {
  -     Object attr=attributes.get(name);
  +        Object attr=attributes.get(name);
   
  -     if(attr!=null)
  -         return(attr);
  +        if(attr!=null)
  +            return(attr);
   
  -     return coyoteRequest.getAttribute(name);
  +        attr =  coyoteRequest.getAttribute(name);
  +        if(attr != null)
  +            return attr;
  +        // XXX Should move to Globals
  +        if(Constants.SSL_CERTIFICATE_ATTR.equals(name)) {
  +            coyoteRequest.action(ActionCode.ACTION_REQ_SSL_CERTIFICATE, null);
  +            attr = getAttribute(Globals.CERTIFICATES_ATTR);
  +            if(attr != null)
  +                attributes.put(name, attr);
  +        }
  +        return attr;
       }
  -
   
       /**
        * Return the names of all request attributes for this Request, or an
  
  
  

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

Reply via email to