On Fri, 10 Aug 2001, Keith Ball wrote:
> Hi,
>
> I have a problem with the following code....
>
> java.security.cert.X509Certificate clientCert2 =
> (java.security.cert.X509Certificate)
> request.getAttribute("javax.servlet.request.X509Certificate");
>
> It appears that java..x509Certificate != javax..x509Certificate and so I
> can't cast from the JSSE to the normal Java Security API.
>
That's correct ... you cannot cast it. Tomcat should be doing the
conversion for you (Tomcat 4 does this) -- if Tomcat 3.2.3 is not doing
that, it's a bug. Could you please report it to:
http://nagoya.apache.org/bugzilla/
Craig
> The error thrown is this...
>
> java.lang.ClassCastException:
> com.sun.security.cert.internal.x509.X509V1CertImpl
>
> I am running JDK 1.3.0_02, JSSE 1.0.2, Apache 1.3.20 and Tomcat 3.2.3.
>
> Anyone got any ideas???
>
> I believe this to be a problem associated either with Tomcat or the JSSE
> API, as I am running the same code perfectly on Netscape's iPlanet 4.1.
>
> Best Regards,
>
> Keith Ball
> Vendor Intergration Engineer
>
> DIGITAL RUM LTD is the developer of
> a ground-breaking new service that allows
> shoppers to compare and buy brand-name
> goods via their WAP search mobile phones.
>
> Digital Rum Germany GmbH
> Zweibrueckenstr. 2
> 80331 Muenchen
> ph: +49 (89) 210 21 ##
> <mailto:[EMAIL PROTECTED]>
> <http://www.digitalrum.com>
>