jce无法验证提供程序bc [英] jce cannot authenticate the provider bc

查看:168
本文介绍了jce无法验证提供程序bc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个应用程序,我在BountyCastle.jar的帮助下使用了Cryptography。
我还有一行Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());

I have developed an application in which I have used the Cryptography with the help of BountyCastle.jar. I also had a line Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());

当我从Netbeans执行程序时一切正常

Everything works fine when I execute the program from Netbeans

但是当我将应用程序打包在一个可执行的jar中时在内部使用BouncyCastle jar并执行jar,

But when I packaging the application in an executable jar which internally uses BouncyCastle jar and execute the jar,

我正在异常

JCE无法验证提供者BC
java.lang.SecurityException:JCE无法验证提供者BC

JCE cannot authenticate the provider BC java.lang.SecurityException: JCE cannot authenticate the provider BC

是否还有其他approch来实现相同的功能。因为非技术人员很难在jre的ext文件夹中添加
BountyCastle.jar。那么有没有其他方法可以解决我的问题。

Is there any other approch to implement the same. Because it is difficult for non technical person to add BountyCastle.jar in ext folder of jre. so is there any other method to solve my problem.

是否有任何方法可以在netbeans中打包jar时排除BountyCastle.jar,以便可以从外部lib文件夹访问。 / p>

Is there any method to exclude BountyCastle.jar while packaging jar in netbeans so that will accessible from external lib folder.

推荐答案

BouncyCastle jar 存档已签名通过 BouncyCastle 来防止未经授权的更改。它需要 JCA 签名才能被信任为加密提供程序,因此请不要将其删除。

The BouncyCastle jar archive is signed by BouncyCastle to prevent unauthorized changes. It needs the JCA signature in order to be trusted as a cryptography provider, so do not remove it.

请参阅相关帖子

这篇关于jce无法验证提供程序bc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆