When using APR/native HTTPS connector, based on OpenSSL, if the client connects to HTTPS connector with a valid client certificate, the client X509 certificate is not present in the array of certificates in the javax.servlet.request.X509Certificate ServletRequest attribute, only certificates from the CAs in the certification chain are present. If no CA certificate is sent by the client then the attribute is null. This is not compliant with Servlet Specification v2.3, in the section "SRV.4.7 SSL Attributes" which states: "If there is an SSL certificate associated with the request, it must be exposed by the servlet container to the servlet programmer as an array of objects of type java.security.cert.X509Certificate and accessible via a ServletRequest attribute of javax.servlet.request.X509Certificate. The order of this array is defined as being in ascending order of trust. The first certificate in the chain is the one set by the client, the next is the one used to authenticate the first, and so on."
Created attachment 19414 [details] A patch fixing the bug This patch is working for me (tested/validated in my company), and will be deployed as part of a commercial product based on Tomcat 5.5.20.
Duplicate of http://issues.apache.org/bugzilla/show_bug.cgi?id=37869 *** This bug has been marked as a duplicate of 37869 ***