tags:

views:

51

answers:

1

I've got the following code making SSL work with my HttpClient connections and such

SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("https", 
            SSLSocketFactory.getSocketFactory(), 443));

HttpParams params = new BasicHttpParams();

SingleClientConnManager mgr = new SingleClientConnManager(params, schemeRegistry);

HttpClient client = new DefaultHttpClient(mgr, params);

However, does this actually validate the cert? It seems like there should be more to it.

A: 

Nevermind, the above code does indeed validate the certificate. I tried it with some random self signed certs for different sites, and it failed.

synic