tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Eric Miller" <jemil...@uchicago.edu>
Subject javax.servlet.request.key-size/cipher-suite attributes aren't being set in Tomcat 4.0-b2 and later
Date Wed, 06 Jun 2001 17:57:18 GMT
I submitted a bug report using the Apache Bug Database regarding this.
However, something seems to be wrong with that database because I don't see
it in there now. Anyone know what happened to this bug?

There are some new attributes in Tomcat 4 which allow you to query for SSL
related information such as the cipher suite that is being used and the key
size. BTW, it would be nice if this information were in Tomcat 3.x as well.
In Tomcat 4-b1, this works fine. In later versions of Tomcat, these
attributes don't appear to be being set.

The following is the output in Tomcat 4-b1.

javax.servlet.request.key-size
javax.servlet.request.cipher-suite
Key size: 128
Cipher suite: SSL_RSA_WITH_RC4_128_MD5

Here it is in Tomcat 4-b5. The same is true for several other post b1
versions.

javax.servlet.request.cipher_suite
javax.servlet.request.key_size
Key size: null
Cipher suite: null


Here's the URL that was used.

https://localhost:8443/servlet/Test

Here's the sample program.

import java.io.*;
import java.util.*;
import javax.servlet.http.*;

public class Test extends HttpServlet
{
 public void doGet(HttpServletRequest req, HttpServletResponse resp) throws
IOException
 {
  try
  {
   resp.setContentType("text/html");

   PrintWriter pw = resp.getWriter();

   pw.println("<html><head><title>Test</title></head><body>");

   Enumeration e = req.getAttributeNames();

   while(e.hasMoreElements())
   {
    pw.println("<p>" + (String)e.nextElement() + "</p>");
   }

   pw.println("<p>Key size: " +
req.getAttribute("javax.servlet.request.key-size") + "</p>");

   pw.println("<p>Cipher suite: " +
req.getAttribute("javax.servlet.request.cipher-suite") + "</p>");

   pw.println("</body></html>");

   pw.close();
  }
  catch(Exception e)
  {
   System.err.println(e);
  }
 }
}

Jon

P.S. I'm not on this list, so, please respond to my email address directly
if you can.



Mime
View raw message