Looking through the code I am have a hard time trying to understand
the easiest way to get a SystemDefaultHttpClient with the host name
verifier set to ALLOW_ALL_HOSTNAME_VERIFIER.

I have the following code:

SystemDefaultHttpClient client =  new SystemDefaultHttpClient();
SSLSocketFactory sf = SSLSocketFactory.getSystemSocketFactory();
sf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
client.getConnectionManager().getSchemeRegistry().register(new
Scheme("https", 443, sf);

The problem with this is that the sf.setHostnameVerifier(...) is
depreciated.  Looking at the depreciation comments I do not see and
hints on what I should use to set the host name verifier.

I don't really want to duplicate all the code to pull in the system
properties to create  a 'System' SocketFactory, but I see no other way
to set the host name verifier.

Any ideas?

Thanks in advance!

Billy

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to