mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复部分环境下使用 Bouncy Castle可能的JCE cannot authenticate the provider BC问题
This commit is contained in:
@@ -21,6 +21,9 @@ public class ProviderFactory {
|
||||
* @return {@link Provider}
|
||||
*/
|
||||
public static Provider createBouncyCastleProvider() {
|
||||
return new org.bouncycastle.jce.provider.BouncyCastleProvider();
|
||||
final org.bouncycastle.jce.provider.BouncyCastleProvider provider = new org.bouncycastle.jce.provider.BouncyCastleProvider();
|
||||
// issue#2631@Github
|
||||
SecureUtil.addProvider(provider);
|
||||
return provider;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user