开发者

HTTPS with Self-Signed SSL Certificate Issues... Solution or better way?

开发者 https://www.devze.com 2022-12-28 21:22 出处:网络
All I need to do is download some basic text-based and image files from a web server that has a self-signed SSL certificate.

All I need to do is download some basic text-based and image files from a web server that has a self-signed SSL certificate.

I have been trying to figure out how to use HttpClient to do this, but getting the SSL to work is a nightmare that seems to be way too much trouble for such a simple task.

Is there a better way to perform these file downloads? Perhaps through a WebView or Browser feature? Reinventing th开发者_如何学JAVAe wheel of making a simple HTTPS GET request is a major pain, and is significantly holding up my development schedule.


I found two great examples of how to accept self-signed SSL certificates, one each for HttpsURLConnection and HttpClient.

HttpsURLConnection solution: Https Connection Android

HttpClient solution: Self-signed SSL acceptance on Android

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号