Start by printing out the keys to your incoming request.
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> BERWART Thierry
> Sent: Friday, August 25, 2000 12:52 AM
> To: [EMAIL PROTECTED]
> Subject: How can i get a certificate in a servlet ?
>
>
> Hello
>
> I run my servlets on apache with mod SSL configurated for mutual
> authentification
> (the client must also send his certificate to the server for
> authentification)
>
> And i want to get the client certificate in a servlet. But i
> don't know how
> i can do that !
>
> I tried to use the follow code but it seems to work only with Java Web
> Server.
>
> String cipherSuite = (String)
> req.getAttribute("javax.net.ssl.cipher_suite");
> out.println("Cipher Suite" + cipherSuite);
>
> if(cipherSuite != null)
> {
> X509Certificate certChain[] = (X509Certificate) req.getAttribute
> ("javax.net.ssl.peer_certificates");
> if (certChain != null)
> {
> for (int i=0; i< certChain.length; i++)
> {
> out.println("Client Certificate ["+i+"] = " +
> certChain[i].toString());
> }
> }
> }
>
>
> Please HELP ME ! :-)
>
> Thierry
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html