本文介绍了keytool错误:java.security.KeyStoreException:找不到BKS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在java sun keytool中创建.bks密钥库,我该怎么办?

how to create a .bks keystore in java sun keytool, what should i do?

C:\Program Files\Java\jdk1.6.0\jre\bin>keytool -genkey -alias server3private -ke
ystore server3.private -storetype BKS -keyalg rsa -dname "CN=Your Name, OU=Your
Organizational Unit, O=Your Organization, L=Your City, S=Your State, C=Your Coun
try" -storepass tahirpw -keypass tahirpw

它给我错误

keytool错误:java.security.KeyStoreException:未找到BKS

keytool error: java.security.KeyStoreException: BKS not found

推荐答案

您的错误表明 keytool 尝试实例化 BKS 密钥库但没有加密服务提供程序(CSP)能够提供此类实现。 BKS 密钥库类型是由实施的类型。

Your error indicates that keytool tries to instantiate a BKS keystore but no Cryptographic Service Provider (CSP) is able to provide such an implementation. BKS keystore type is a type implemented by the BouncyCastle CSP.

因此有2个解决方案:


  1. 安装此提供商用Java。 Oracle与Java一起发布。

传递给keytool合适的选项以指示应该使用哪个CSP及其位置:

pass to keytool the suitable options to indicate which CSP should be used and its location:



-storetype BKS                                               <- keystore type
-provider org.bouncycastle.jce.provider.BouncyCastleProvider <- CSP implementation
-providerpath /path/to/bouncycastle.jar                      <- Path to the CSP jar file


这篇关于keytool错误:java.security.KeyStoreException:找不到BKS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 02:35