JCE cannot authenticate the provider BC
Nidhi Aggarwal <nidaggar-dv/[email protected]> Wed, 26 Jun 2019 06:23:53 +0000
| Newsgroups | gmane.comp.encryption.bouncy-castle.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I have downloaded the bouncycastle provider (bcprov-jdk15on-162.jar<https://www.bouncycastle.org/download/bcprov-jdk15on-162.jar>) latest builds from maven, bouncycastle website and added them to classpath and on execution I get the following stack trace. Can someone please help in resolving this. In earlier versions, we never faced any authentication issues.
[junit] Caused by: java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
[junit] at javax.crypto.JceSecurity.getInstance(JceSecurity.java:101)
[junit] at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:249)
[junit] at org.bouncycastle.jcajce.util.NamedJcaJceHelper.createKeyGenerator(Unknown Source)
[junit] ... 92 more
[junit] Caused by: java.util.jar.JarException: file:bundles/bcprov_1.62.jar has unsigned entries - org/bouncycastle/LICENSE.class
[junit] at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:462)
[junit] at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:322)
[junit] at javax.crypto.JarVerifier.verify(JarVerifier.java:250)
[junit] at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:161)
[junit] at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:187)
[junit] at javax.crypto.JceSecurity.getInstance(JceSecurity.java:98)
[junit] at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:249)
[junit] at org.bouncycastle.jcajce.util.NamedJcaJceHelper.createKeyGenerator(Unknown Source)
[junit] at org.bouncycastle.cms.jcajce.EnvelopedDataHelper.createKeyGenerator(Unknown Source)
[junit] at org.bouncycastle.cms.jcajce.JceCMSContentEncryptorBuilder$CMSOutputEncryptor.<ini
Regards,
Nidhi