Trust Anchor not found for Android SSL Connection

后端 未结 17 778
囚心锁ツ
囚心锁ツ 2020-11-22 05:06

I am trying to connect to an IIS6 box running a godaddy 256bit SSL cert, and I am getting the error :

java.security.cert.CertPathValidatorException: Trust an         


        
17条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 05:14

    The solution of @Chrispix is dangerous! Trusting all certificates allows anybody to do a man in the middle attack! Just send ANY certificate to the client and it will accept it!

    Add your certificate(s) to a custom trust manager like described in this post: Trusting all certificates using HttpClient over HTTPS

    Although it is a bit more complex to establish a secure connection with a custom certificate, it will bring you the wanted ssl encryption security without the danger of man in the middle attack!

提交回复
热议问题