本文介绍了如何将.cer转换为BKS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一个扩展名为.cer的证书。我的应用程序将通过https连接到站点。 我正在尝试使用此命令创建BKSI have a certificate with .cer extension. My application will connect to site with https.I'm trying to create BKS with this commandkeytool -import -alias tomcat -file X://KeyStore/fidoserver.crt -keypass password - keystore X://KeyStore/keystore.bks -storetype BKS -storepass 222222 -providerClass org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath X://KeyStore/bcprov-jdk16-146.jar,但得到FileNotFound X://KeyStore/keystore.bks异常如何如果我有.cer会得到BKS吗?, but get FileNotFound X://KeyStore/keystore.bks exceptionHow to get BKS if i have .cer?推荐答案尝试在终端上使用它(我假设你已经下载了Bouncy Castle jar在 http://bouncycastle.org/latest_releases.html ):Try using this on Terminal (I assume you've downloaded Bouncy Castle jar at http://bouncycastle.org/latest_releases.html): keytool -importcert -v -trustcacerts -filepath_to_cert / interm_ca.cer-alias IntermediateCA -keystorepath_to_your_app / res / raw / myKeystore.bks-provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath path_to_bouncycastle / bcprov-jdk16-145.jar-s toretype BKS -storepass mysecret它应该在你的app / res / raw文件夹上创建一个BKS密钥库。然后,使用以下命令验证密钥库:it should create a BKS keystore on your app's /res/raw folder. Then, verify your keystore with the following command: keytool -list -keystorepath_to_your_app / res / raw / myKeystore.bks-provider org .bouncycastle.jce.provider.BouncyCastleProvider -providerpathpath_to_bouncycastle / bcprov-jdk16-145.jar-storetype BKS -storepass mysecret it应输出如下内容: RootCA,22.10.2010,trustedCertEntry,Thumbprint(MD5):24:77:D9:A8:91:D1:3B:FA:88:2D:C2 :FF:F8:CD:33:93 IntermediateCA,22.10.2010,trustedCertEntry,Thumbprint(MD5):98:0F:C3:F8:39:F7:D8:05:07:02:0D:E3 :14:5B:29:43it should output something like this:RootCA, 22.10.2010, trustedCertEntry, Thumbprint (MD5): 24:77:D9:A8:91:D1:3B:FA:88:2D:C2:FF:F8:CD:33:93IntermediateCA, 22.10.2010, trustedCertEntry, Thumbprint (MD5): 98:0F:C3:F8:39:F7:D8:05:07:02:0D:E3:14:5B:29:43 来源 这篇关于如何将.cer转换为BKS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-14 17:19