'No peer certificate' error in Android 2.3 but NOT in 4

前端 未结 5 1571
走了就别回头了
走了就别回头了 2020-11-30 01:15

Getting the \"javax.net.ssl.SSLPeerUnverifiedException: No peer certificate error\" in an emulator running Android 2.3 but NOT in 4. In 4 it works perfectly. I\

5条回答
  •  独厮守ぢ
    2020-11-30 02:03

    This thread was really helpful when I debugged a similar issue.

    Summary Android 2.3 HTTPS/SSL checklist:

    • If your CA is in Android's 2.3 list of trusted CA's -- and Thawte is -- there's no need to include the certificate in the app.
    • Android 2.3 does not support Server Name Indication so if your server is relying on it for SSL handshaking, Android may not be getting the certificates you're expecting.
    • Do you have certificate chain on the server installed, and is it ordered correctly? Most browsers handle out-of-order certificate chains but Android 2.3 does not. bdc's answer in the thread I mentioned above describes how to check the validity of your SSL certificate and chain with "openssl s_client -connect yourserver.com:443".
    • When digging up that old 2.3 device you have in your bottom drawer, please ensure its date and time are set correctly after being powerless for too long.

提交回复
热议问题