Do you mean... ?

X509Certificate[] certs;
certs=(X509Certificate[])request.getAttribute("javax.servlet.request.X509Certificate");
if(certs!=null) {
X509Certificate crt = certs[0];

         // Use the cert here.
         String subjectDNName = crt.getSubjectDN().getName();
         System.out.println("Issuer: "+crt.getIssuerDN().getName());
         // And so on...
     }

I developed a "simple" test servlet that may help you test your servlet environment. If someone wishes it, I can contribute it to TC or send it privately for any use. For that, please contact me at work: < antonio dot fiol at red dot es >

Antonio Fiol


appa rao wrote:

Hi,

Can any one give me an example of how to use Digital Certificates for authentication and authorizatioin in Tomcat? I am struggling to under the concept of certificates and their use in authentication and authorization.. I am using Tomcat - 4.1.24.

Thanks in advance..

appa

SMS using the Yahoo! Messenger;Download latest version.




Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to