I\'m trying to use loopj for making async HTTP
requests. Works great, except when I try to access https site with self-signed cert. I get
Simpler way is to use built-in MySSLSocketFactory in loopj, so you don't have to create another class
try {
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
trustStore.load(null, null);
MySSLSocketFactory sf = new MySSLSocketFactory(trustStore);
sf.setHostnameVerifier(MySSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
client.setSSLSocketFactory(sf);
}
catch (Exception e) {}