Getting the above exception with error log after registering BC provider dynamically and statically via
Security.addProvider(new BouncyCastleProvider());
However, on
Cipher.getInstance("AES/CTS/NoPadding", "BC")
I get the following error
Failure to decrypt: bad encryption:
java.lang.SecurityException: JCE cannot authenticate the provider BC
Caused by: java.util.jar.JarException:
file:/space/uploads/unittest/jars/myjar.jar has unsigned entries - <some-location>/README.txt
at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:500)
at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:361)
at javax.crypto.JarVerifier.verify(JarVerifier.java:289)
at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:159)
at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:185)
at javax.crypto.Cipher.getInstance(Cipher.java:653)
at javax.crypto.Cipher.getInstance(Cipher.java:596)