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
.
精彩评论