Unable to find valid certification path to requested target - error even after cert imported

前端 未结 10 2214
野的像风
野的像风 2020-11-22 13:12

I have a Java client trying to access a server with a self-signed certificate.

When I try to Post to the server, I get the following error:

un

10条回答
  •  醉话见心
    2020-11-22 13:33

    I had the same problem with sbt.
    It tried to fetch dependencies from repo1.maven.org over ssl
    but said it was "unable to find valid certification path to requested target url".
    so I followed this post and still failed to verify a connection.
    So I read about it and found that the root cert is not enough, as was suggested by the post,so -
    the thing that worked for me was importing the intermediate CA certificates into the keystore.
    I actually added all the certificates in the chain and it worked like a charm.

提交回复
热议问题