Better implementation of MySSLSocketFactory.java

Better implementation of MySSLSocketFactory.java that supports creating KeyStores with Certificates to trust.