if (!validateCerts) {
tlsParams
.setTrustManagers(new TrustManager[] { new AcceptAllTrustManager() });
} else {
tlsParams
.setTrustManagers(new TrustManager[] { new DefaultTrustManager() });
}
tlsParams.setDisableCNCheck(!validateCn);
conduit.setTlsClientParameters(tlsParams);
}