KeyStore完整性检查失败

时间:2013-06-12 18:07:26

标签: android ssl bouncycastle keystore asmack

我正在尝试在Facebook中集成Facebook Chat,到目前为止我已成功导入asmack库,我正尝试使用Facebook JabberID登录。

我已经提到了以下配置来连接它与Facebook服务器,但问题是我收到以下错误KeyStore integrity check failed

06-12 23:18:30.508: W/System.err(2204): java.io.IOException: KeyStore integrity check failed.
06-12 23:18:30.528: W/System.err(2204):     at org.bouncycastle.jce.provider.JDKKeyStore.engineLoad(JDKKeyStore.java:888)
06-12 23:18:30.528: W/System.err(2204):     at java.security.KeyStore.load(KeyStore.java:676)
06-12 23:18:30.538: W/System.err(2204):     at org.jivesoftware.smack.KeyStoreManager.getOrCreateKeyStore(KeyStoreManager.java:42)
06-12 23:18:30.548: W/System.err(2204):     at org.jivesoftware.smack.XMPPConnection.enableEncryption(XMPPConnection.java:880)
06-12 23:18:30.548: W/System.err(2204):     at org.jivesoftware.smack.XMPPConnection.proceedTLSReceived(XMPPConnection.java:900)
06-12 23:18:30.608: W/System.err(2204):     at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:263)
06-12 23:18:30.608: W/System.err(2204):     at org.jivesoftware.smack.PacketReader.access$1(PacketReader.java:216)
06-12 23:18:30.608: W/System.err(2204):     at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:70)

这是我的代码,TRUST_STORE_PATH路径是/system/etc/security/cacerts.bks

ConnectionConfiguration config = 
       new ConnectionConfiguration("chat.facebook.com", 5222);


        Log.d("PATH" ,TRUST_STORE_PATH + " ");

        if (SDK_INT >= 14) {
            config.setTruststoreType("AndroidCAStore");
            config.setTruststorePassword(null);
            config.setTruststorePath(null);
        } else {
            config.setTruststoreType("BKS");
            config.setTruststorePath(TRUST_STORE_PATH);
        }

我真的不知道这个错误以及如何摆脱它,我看到以下线程但没有运气

post

0 个答案:

没有答案