Discussion:
JCE in 1.4.1
(too old to reply)
Ken Rider
2003-09-08 20:22:28 UTC
Permalink
I have a class that uses java.security and javax.crypto packages. When I run
it with Sun 1.3.1, Sun 1.4.1 and IBM 1.3.1 it works fine but when I run it
with IBM 1.4.1 I get the following error.

java.security.KeyStoreException: Cannot authenticate JCE framework
java.util.jar.JarException:
jar:file:/home/user/dev/vendor/Linux/ibm/j2sdk/j2sdk1.4.1/jre/lib/security.j
ar!/ has unsigned entries - com/ibm/Copyright.class
at com.sun.crypto.provider.JceKeyStore.engineSetKeyEntry(DashoA6275)
at java.security.KeyStore.setKeyEntry(KeyStore.java:427)

My guess is this is due to the JCE 1.2.2 jars being in the classpath but if
I don't include them in the classpath I get a NoClassDefFoundError for
com/sun/crypto/provider/SunJCE.

Any help getting this resolved would be appreciated.
Neil Masson
2003-09-09 17:47:31 UTC
Permalink
Post by Ken Rider
I have a class that uses java.security and javax.crypto packages. When I
run it with Sun 1.3.1, Sun 1.4.1 and IBM 1.3.1 it works fine but when I
run it with IBM 1.4.1 I get the following error.
java.security.KeyStoreException: Cannot authenticate JCE framework
jar:file:/home/user/dev/vendor/Linux/ibm/j2sdk/j2sdk1.4.1/jre/lib/security.j
Post by Ken Rider
ar!/ has unsigned entries - com/ibm/Copyright.class
at com.sun.crypto.provider.JceKeyStore.engineSetKeyEntry(DashoA6275)
at java.security.KeyStore.setKeyEntry(KeyStore.java:427)
My guess is this is due to the JCE 1.2.2 jars being in the classpath but
if I don't include them in the classpath I get a NoClassDefFoundError for
com/sun/crypto/provider/SunJCE.
Any help getting this resolved would be appreciated.
You shouldn't be coding specific crypto providers into your app as you
cannot guarantee that those specific classes will be present on a JVM.
There is quite a lot on crypto providers on Sun's website.

Neil
Ken Rider
2003-09-09 19:19:11 UTC
Permalink
Thanks. That got me on the right track.

I had tried getting rid of the SunJCE providerer but got other errors and
thought that was why. I had changed
KeyStore.getInstance("JCEKS", "SunJCE");
to
KeyStore.getInstance("JKS");
but I really should have changed it to
KeyStore.getInstance("JCEKS");
since I'm storing SecretKey's.
Post by Neil Masson
Post by Ken Rider
I have a class that uses java.security and javax.crypto packages. When I
run it with Sun 1.3.1, Sun 1.4.1 and IBM 1.3.1 it works fine but when I
run it with IBM 1.4.1 I get the following error.
java.security.KeyStoreException: Cannot authenticate JCE framework
jar:file:/home/user/dev/vendor/Linux/ibm/j2sdk/j2sdk1.4.1/jre/lib/security.j
Post by Neil Masson
Post by Ken Rider
ar!/ has unsigned entries - com/ibm/Copyright.class
at com.sun.crypto.provider.JceKeyStore.engineSetKeyEntry(DashoA6275)
at java.security.KeyStore.setKeyEntry(KeyStore.java:427)
My guess is this is due to the JCE 1.2.2 jars being in the classpath but
if I don't include them in the classpath I get a NoClassDefFoundError for
com/sun/crypto/provider/SunJCE.
Any help getting this resolved would be appreciated.
You shouldn't be coding specific crypto providers into your app as you
cannot guarantee that those specific classes will be present on a JVM.
There is quite a lot on crypto providers on Sun's website.
Neil
Loading...