[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] JDK1.2 vs JDK1.3

The following code segment executes perfectly with JDK1.2:

iaik.x509.NetscapeCertRequest certreq = new
int keylen =

However, with JDK1.3 I get the following exception:
"java.lang.ClassCastException: com.sun.rsajca.JSA_RSAPublicKey"

I can fix the exception by modifying my code to read:

iaik.x509.NetscapeCertRequest certreq = new
java.security.PublicKey x =
iaik.security.rsa.RSAPublicKey y = new
int keylen = y.getModulus().bitLength();

I guess this email serves mostly as information to those out there who
may be migrating from JDK1.2 to JDK1.3 unless somebody has a better
solution for me. Perhaps I am overlooking something (my guess is that
Sun changed something under the hood of their
java.security.interfaces.RSAPublicKey class). I'd prefer not to have to
change code if at all possible.

Thanks for any response,

Keith Wiseman
Digital Signature Trust co.

Mailinglist-archive at

To unsubscribe send an email to listserv@iaik.at with the folowing content: