try {
if (hostcertsKeyFile != null && trustedCertFile != null) {
if (new File(trustedCertFile).isFile()) {
this.xregistryClient = new XRegistryClient(hostcertsKeyFile, trustedCertFile, xregistryUrl);
} else {
TrustedCertificates certificates = TrustedCertificates.load(trustedCertFile);
TrustedCertificates.setDefaultTrustedCertificates(certificates);
X509Certificate[] trustedCertificates = certificates.getCertificates();
System.out.println("xregistryUrl=" + xregistryUrl);
System.out.println("hostcertsKeyFile=" + hostcertsKeyFile);
System.out.println("trustedCertificates=" + trustedCertificates);
this.xregistryClient = new XRegistryClient(hostcertsKeyFile, trustedCertificates, xregistryUrl);
}