做HTTPS电话时,错版的密钥库 [英] wrong version keystore when doing https call
问题描述
您好同胞的Android codeRS。
Hello fellow android coders.
我想要做的,从我的Android code HTTPS的安全呼叫。呼叫那张精致的仿真器,但实际的三星Galaxy设备上,我收到了SSL错误。
I'm trying to do a https secure call from my android code. The call goes fine on the emulator but on the actual Samsung Galaxy device I get a SSL error.
我用疯狂的鲍勃方法处理cetificate。 这是疯狂的羁绊链接:<一href="http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html">http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html.
I used crazy bobs method for handling the cetificate. Here is crazy bobs link: http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html.
问题是,我得到一个错误:错版的密钥存储自定义SSLSocketFactory的对象内
Problem is I get an error: "wrong version of keystore" inside the custom SSLSocketFactory object.
这是什么任何建议做才能解决这个问题? 谢谢你。
Any suggestions on what to do to fix this? Thanks.
推荐答案
你创建你的密钥库与充气城堡格式?创建具有密钥工具的密钥库时,所有这3个参数是必须的(特别是仓库类型必须是 BKS
):
Did you create your keystore with the Bouncy Castle format? All these 3 parameters are mandatory when creating the keystore with keytool (and especially the keystore type must be BKS
):
-storetype BKS
-provider org.bouncycastle.jce.provider.BouncyCastleProvider
-providerpath /path/to/bouncycastle.jar
Android使用BouncyCastle的1.46版本,请确保在创建密钥库时,你使用这个版本 版本1.46发现这里
Android uses version 1.46 of bouncycastle, make sure you use this version when creating your keystore Version 1.46 is found here
这篇关于做HTTPS电话时,错版的密钥库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!