gpt4 book ai didi

java - Bouncy CaSTLe 的安全异常

转载 作者:行者123 更新时间:2023-12-02 15:15:17 25 4
gpt4 key购买 nike

我使用的是 Mac 操作系统,在 Mac 上执行软件更新后遇到此问题。

Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
at javax.crypto.SunJCE_b.a(DashoA13*..)
at javax.crypto.SecretKeyFactory.getInstance(DashoA13*..)
at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:667)
... 95 more
Caused by: java.util.jar.JarException: Cannot parse jar:file:/Users/himajumdar/Work/jboss/jboss-5.1.0.GA/server/default/tmp/a00c-b5p2h4-hgi84jo1-1-hgi84qe5-w/csa.ear!/lib/bcprov-jdk15-140.jar
at javax.crypto.SunJCE_c.a(DashoA13*..)
at javax.crypto.SunJCE_b.b(DashoA13*..)
at javax.crypto.SunJCE_b.a(DashoA13*..)
... 98 more

我试过these建议

  1. 添加了 security.provider.11=org.bouncycaSTLe.jce.provider.BouncyCaSTLeProvider到java.security
  2. 在/Home/jre/lib/ext 下添加了 bcprov-jdk15-140.jar

但这有帮助。我尝试将 jdk6 更新为 jdk7 并执行了相同的操作,但出现了稍微不同的错误 unsigned jar

    at org.jboss.seam.Component.newInstance(Component.java:2132)
... 75 more
Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
at javax.crypto.JceSecurity.getInstance(JceSecurity.java:114)
at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:243)
at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:667)
... 95 more
Caused by: java.util.jar.JarException: jar:file:/Users/himajumdar/Work/jboss/jboss-5.1.0.GA/server/default/tmp/a00c-4nf5e1-hgiayarg-1-hgiayihg-w/csa.ear!/lib/bcprov-jdk15-140.jar has unsigned entries - csa-ejb-3.45.0.8-SNAPSHOT.jar
at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:462)
at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:322)
at javax.crypto.JarVerifier.verify(JarVerifier.java:250)

我已经用 jdk16-140.jar 尝试过此操作,但结果相同。有人可以想出任何其他选择来解决这个问题吗?谢谢。

最佳答案

  1. 我从本地 jre/jdk ext 目录中删除了 bouncy caSTLe (bcprov-jdk15-140.jar)
  2. 将 bcprov-jdk15-140.jar 复制到/jboss/jboss-5.1.0.GA/server/default/lib/下
  3. 将依赖范围从默认编译更改为提供的 充气城堡 bcprov-jdk15 140 假如
  4. 在 java.security 中添加了“security.provider.11=org.bouncycaSTLe.jce.provider.BouncyCaSTLeProvider”

This is my Reference

关于java - Bouncy CaSTLe 的安全异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16469567/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com