开发者

where to save and how to use a jks certificate in Android

Im using Jsoup to开发者_JAVA百科 pull in xml, and while i have it working in java using

                System.setProperty("javax.net.ssl.trustStore", "/Users/EK/web2.uconn.edu.jks");

this code wont work in Android. I know i need to store the certificate somewhere in the android project, but where would i save it/how would i reference it? If someone else knows a different way to establish an ssl connection without jsoup that is fine as well.


You can use HttpClient to get HTTP content. If you need a custom trust store, you can store it as a raw asset, load it into a KeyStore and use that to initialize a SocketFactory, which you use to initialize the HttpClient.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜