Android SSL握手错误

时间:2016-04-16 00:43:38

标签: android sslhandshakeexception

  1. 我有一个使用CA签名SSL证书配置的Apache HTTP Server。
  2. 我使用ProxyPass将流量从httpserver端口443传输到IBM Worklight服务器http://localhost:9009
  3. 问题是这种方法在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.
    

1 个答案:

答案 0 :(得分:0)

来自评论:

  

感谢。解决方案是在Android的可信商店中手动添加您的证书。 - Kunwar Adeel 4月25日2:55