问题是这种方法在iOS设备上运行得很好但是当涉及到Android设备时,我遇到了ssl握手问题。
(Thread.java:841)
04-16 05:30:51.950: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(31051): Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
04-16 05:30:51.950: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(31051): at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:282)
04-16 05:30:51.950: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(31051): at com.android.org.conscrypt.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:202)
04-16 05:30:51.950: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(31051): at com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:612)
04-16 05:30:51.950: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(31051): at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
04-16 05:30:51.950: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(31051): at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:406)
04-16 05:30:51.950: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(31051): ... 13 more
04-16 05:30:51.950: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(31051): Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
答案 0 :(得分:0)
来自评论:
感谢。解决方案是在Android的可信商店中手动添加您的证书。 - Kunwar Adeel 4月25日2:55