Ant Unsigned Entries and BC authentication

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Ant Unsigned Entries and BC authentication

Gad Abraham
Hi,

I'm calling a class which does encryption using BC. Calling it directly
works fine, however when it's called from an Ant <java> target, I get:


java.io.IOException: exception encrypting data -
java.security.NoSuchProviderException: JCE cannot authenticate the
provider BC
at
org.bouncycastle.jce.provider.JDKPKCS12KeyStore.wrapKey(JDKPKCS12KeyStore.java:599)
at
org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineStore(JDKPKCS12KeyStore.java:1131)
at
java.security.KeyStore.store(KeyStore.java:620)

<snipping lots of lines>

at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.util.jar.JarException: file:/usr/share/ant/lib/ant.jar
has unsigned entries -
org/apache/tools/ant/AntClassLoader$ResourceEnumeration.class
at javax.crypto.SunJCE_d.b(DashoA6275)
at javax.crypto.SunJCE_d.a(DashoA6275)
at javax.crypto.SunJCE_d.a(DashoA6275)
at javax.crypto.SunJCE_b.b(DashoA6275)
... 28 more


I should add that the class itself explicitly adds BC as a provider, and
I've downloaded the Unlimited JCE and installed it in
JAVA_HOME/jre/lib/security. Also, I'm using bouncycastle 1.29,
JDK1.4.2_08-b03 on Debian Linux.

Has anyone seen this before?

Thanks,
Gad