-
1. Re: get X509Certificate with Tomcat ?
bierstuebl Sep 30, 2002 9:36 AM (in response to araujo)I got nearly the same problem!!
No one seems to have a solution for that.
I also get a ClassCastException, but the Object i get returned from getAttribute("javax.servlet.request.X509Certificate") is not null.
At least i can ask it, what type it is by
req.getAttribute("javax.servlet.request.X509Certificate").getClass().toString());
This tells me, that it is an Object of type javax.security.cert.X509Certificate !!!
But when I try to cast it into an X509Certificate, theres always a ClassCastException. How can that be?
If anyone has got an idea, please post it, i'm desperatly in need of a solution !
Thank you, Bierstuebl -
2. Re: get X509Certificate with Tomcat ?
araujo Oct 1, 2002 11:28 AM (in response to araujo)Hi,
have you done anything in the tomcat config file (tomcat4-service.xml) for getting access to that
javax.security.cert.X509Certificate object ?
In the tomcat4-service.xml do you have something like this :
<!-- SSL/TLS Connector configuration using the SSL domain keystore (Server authentication) -->
Thanks
.david -
3. Re: get X509Certificate with Tomcat ?
araujo Oct 1, 2002 11:30 AM (in response to araujo)
Hi,
have you done anything in the tomcat config file (tomcat4-service.xml) for getting access to that
javax.security.cert.X509Certificate object ?
In the tomcat4-service.xml do you have something like this :
<!-- SSL/TLS Connector configuration using the SSL domain keystore (Server authentication) -->
Thanks
.david -
4. Re: get X509Certificate with Tomcat ?
araujo Oct 1, 2002 11:34 AM (in response to araujo)Hi,
have you done anything in the tomcat config file (tomcat4-service.xml) for getting access to that
javax.security.cert.X509Certificate object ?
In the tomcat4-service.xml do you have something like this :
<!-- SSL/TLS Connector configuration using the SSL domain keystore (Server authentication) -->
Thanks
.david -
5. Re: get X509Certificate with Tomcat ?
araujo Oct 1, 2002 11:45 AM (in response to araujo)
Hi,
have you done anything in the tomcat config file (tomcat4-service.xml) for getting access to that
javax.security.cert.X509Certificate object ?
In the tomcat4-service.xml do you have something like this :
<!-- SSL/TLS Connector configuration using the SSL domain keystore (Server authentication) -->
Thanks
.david -
6. Re: get X509Certificate with Tomcat ?
araujo Oct 1, 2002 11:46 AM (in response to araujo)Hi,
have you done anything in the tomcat config file (tomcat4-service.xml) for getting access to that
javax.security.cert.X509Certificate object ?
In the tomcat4-service.xml do you have something like this :
<!-- SSL/TLS Connector configuration using the SSL domain keystore (Server authentication) -->
Thanks
.david -
7. Re: get X509Certificate with Tomcat ?
araujo Oct 1, 2002 11:47 AM (in response to araujo)Hi,
have you done anything in the tomcat config file (tomcat4-service.xml) for getting access to that
javax.security.cert.X509Certificate object ?
In the tomcat4-service.xml do you have something like this :
<!-- SSL/TLS Connector configuration using the SSL domain keystore (Server authentication) -->
Thanks
.david -
8. Re: get X509Certificate with Tomcat ?
araujo Oct 1, 2002 2:08 PM (in response to araujo)Hi,
have you done anything in the tomcat config file (tomcat4-service.xml) for getting access to that
javax.security.cert.X509Certificate object ?
In the tomcat4-service.xml do you have something like this :
<!-- SSL/TLS Connector configuration using the SSL domain keystore (Server authentication) -->
Thanks
.david -
9. Re: get X509Certificate with Tomcat ?
araujo Oct 1, 2002 2:09 PM (in response to araujo)Hi,
have you done anything in the tomcat config file (tomcat4-service.xml) for getting access to that
javax.security.cert.X509Certificate object ?
In the tomcat4-service.xml do you have something like this :
<!-- SSL/TLS Connector configuration using the SSL domain keystore (Server authentication) -->
Thanks
.david -
10. Re: get X509Certificate with Tomcat ?
cconway Oct 1, 2002 2:21 PM (in response to araujo)When you do your cast, use the fully qualified class name to make sure you aren't picking up another class with the name X509Certificate.
javax.security.cert.X509Certificate cert = (javax.security.cert.X509Certificate )attribute;
You can check your imports to see if you're importing two classes with the same name. -
11. Re: get X509Certificate with Tomcat ?
cconway Oct 2, 2002 2:22 PM (in response to araujo)I retract my previous post. I am trying to enable SSL and I am also getting a ClassCastException. Its comming from the server not my code.
Did you ever figure out how to get around the ClassCastException? -
12. Re: get X509Certificate with Tomcat ?
mantos Oct 17, 2002 8:19 AM (in response to araujo)this is the correct cast
java.security.cert.X509Certificate [] certs = (java.security.cert.X509Certificate[]) request.getAttribute("javax.servlet.request.X509Certificate");