Provide own root-certificate for HTTPS-connection?

我的梦境 提交于 2019-12-11 18:15:57

问题


currently my app connects to a (special) webserver via HTTP to retrieve some data from there via GET/POST and HttpClient.

Now I plan to switch over to HTTPS. My problem: the webpage I'm communicating with uses a CACert root certificate which is not available on all Android devices, so for most users this connection will fail.

CACert provides their root certificates at http://www.cacert.org/index.php?id=3&lang=en . Is there a possibility to use these certificates for my HTTPS connection? I don't expect to install it silently for the whole system, for me it would be enough to provide it just for my special HttpClient connection.

Thanks!


回答1:


OK, found a solution including code example here: http://developer.android.com/training/articles/security-ssl.html



来源:https://stackoverflow.com/questions/22217513/provide-own-root-certificate-for-https-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!