//create CertificateTrustValidator trusting certificates in directory TrustedCertificates
try {
trustedCerts = new File(TRUSTED_CERTIFICATES_PATH);
//we will trust all certificates within this directory
validator = new CertificateFileTrustValidator(trustedCerts);
} catch (Exception ex) {
throw new RuntimeException(" couldnt find the TrustedCertificates directory", ex);
}
//this one trusts anyone