I hope I have submitted this question via the correct mechanism.
 
I wish to extract certificate information from my servlet that is
running within tomcat.  The problem that I get is that my x509
certificate array is always null.  The code snippet that I am attempting
to use is:
 
                        X509Certificate[] certs = (X509Certificate[])
request.getAttribute("javax.servlet.request.X509Certificate");
                        
                        if (certs == null) {
// do non-ssl items
                        } else {
 
                        
//                      Attempt to extract principal name from Subject:
                            String clientDN =
certs[0].getSubjectDN().getName();
                            System.out.println("Client DN = " +
clientDN);
                        }
 
My understanding is that when I use the getAttribute as I have above, I
am supposed to get an array of X509Certificate objects.  Instead, certs
is always null.
 
Any ideas?
 
 
Regards,
Andrew Friebel
Franchise Services
Franchise Product Development Coordinator
Reynolds & Reynolds
------------------------------------
Ph: +613 9535 2222
Fax: +613 9535 2281
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
reynolds.com.au
partsales.com.au
carservice.com.au
 

Reply via email to