tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves CertificatesValve.java
Date Thu, 01 Nov 2001 23:05:21 GMT
jfclere     01/11/01 15:05:21

  Modified:    catalina/src/share/org/apache/catalina/valves
                        CertificatesValve.java
  Log:
  Add javax.servlet.request.ssl_session to TC standalone.
  
  Revision  Changes    Path
  1.8       +19 -4     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/CertificatesValve.java
  
  Index: CertificatesValve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/CertificatesValve.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CertificatesValve.java	2001/07/22 20:25:15	1.7
  +++ CertificatesValve.java	2001/11/01 23:05:21	1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/CertificatesValve.java,v
1.7 2001/07/22 20:25:15 pier Exp $
  - * $Revision: 1.7 $
  - * $Date: 2001/07/22 20:25:15 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/CertificatesValve.java,v
1.8 2001/11/01 23:05:21 jfclere Exp $
  + * $Revision: 1.8 $
  + * $Date: 2001/11/01 23:05:21 $
    *
    * ====================================================================
    *
  @@ -112,7 +112,7 @@
    * amount of code that has to check for the existence of JSSE classes.</p>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.7 $ $Date: 2001/07/22 20:25:15 $
  + * @version $Revision: 1.8 $ $Date: 2001/11/01 23:05:21 $
    */
   
   public final class CertificatesValve
  @@ -387,6 +387,21 @@
           //        if (debug >= 2)
           //            log(" expose: Has cipher suite " + cipherSuite +
           //                " and key size " + keySize);
  +
  +        // Expose ssl_session (getId)
  +        byte [] ssl_session = session.getId();
  +        if (ssl_session!=null) {
  +            StringBuffer buf=new StringBuffer("");
  +            for(int x=0; x<ssl_session.length; x++) {
  +                String digit=Integer.toHexString((int)ssl_session[x]);
  +                if (digit.length()<2) buf.append('0');
  +                if (digit.length()>2) digit=digit.substring(digit.length()-2);
  +                buf.append(digit);
  +            }
  +            request.getRequest().setAttribute(
  +                "javax.servlet.request.ssl_session",
  +                buf.toString());
  +        }
   
           // If we have cached certificates, return them
           Object cached = session.getValue(Globals.CERTIFICATES_ATTR);
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message