javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found

前端 未结 11 759
清酒与你
清酒与你 2020-11-27 15:59

I am using Retrofit to access my REST API. However, when I put my API behind ssl and access it by http://myhost/myapi then I get this error:

Do I need t

11条回答
  •  日久生厌
    2020-11-27 16:32

    This can happen for several reasons, including:

    1. The CA that issued the server certificate was unknown
    2. The server certificate wasn't signed by a CA, but was self signed
    3. The server configuration is missing an intermediate CA

    please check out this link for solution: https://developer.android.com/training/articles/security-ssl.html#CommonProblems

提交回复
热议问题