国密开发中出现以下错误:
Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
详细错误如下:
Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
at javax.crypto.Cipher.getInstance(Cipher.java:656)
at javax.crypto.Cipher.getInstance(Cipher.java:595)
...
... 9 common frames omitted
Caused by: java.util.jar.JarException: file:/C:/app-with-dependencies.jar has unsigned entries - app.properties
at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:502)
at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:363)
at javax.crypto.JarVerifier.verify(JarVerifier.java:289)
at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:164)
at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:190)
at javax.crypto.Cipher.getInstance(Cipher.java:652)
... 12 common frames omitted
原因是:
Oracle JDK 对于加密算法会验证provider jar是否为Oracle签名jar
- 对于 Spring Boot 项目,默认打包方式会


624

被折叠的 条评论
为什么被折叠?



