Hi,

I think with Apache+Jserv ssl variables needs to be read like this:
request.getAttribute("org.apache.jserv.SSL_SERVER_CERT");

(
i have found this info at the Java Apache Users mailing list.
i strongly suggest you to subscribe to this mailing list if you want
to stay at Apache+Jserv :

To subscribe:        [EMAIL PROTECTED]
FAQ: http://java.apache.org/faq/
)


Best wishes,
Andras
----- Original Message -----
From: "BERWART Thierry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 25, 2000 10:51 AM
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

Reply via email to