if( config == null ) {
config = new SystemConfiguration();
}
// requireTrustedCertificate = config.getBoolean("mtwilson.api.ssl.requireTrustedCertificate", true);
// verifyHostname = config.getBoolean("mtwilson.api.ssl.verifyHostname", true);
ApacheTlsPolicy tlsPolicy = createTlsPolicy(config, sslKeystore);
log.info("Created TlsPolicy: "+tlsPolicy.getClass().getName());
SchemeRegistry sr = initSchemeRegistryWithPolicy(protocol, port, tlsPolicy);
connectionManager = new PoolingClientConnectionManager(sr);
// the http client is re-used for all the requests
HttpParams httpParams = new BasicHttpParams();