}
}
} catch (Exception e) {
e.printStackTrace();
log.error("error creating ServerCryto",e);
throw new CredentialException(3, "secError00", e);
}
/**
* Load cacerts
*/
String cacertsPath = System.getProperty("java.home") + "/lib/security/cacerts";
InputStream cacertsIs = new FileInputStream(cacertsPath);
try {
String cacertsPasswd = properties.getProperty(PROP_ID_CACERT_PASS, "changeit");
cacerts = KeyStore.getInstance(KeyStore.getDefaultType());
cacerts.load(cacertsIs, cacertsPasswd.toCharArray());
} catch (GeneralSecurityException e) {
log.error("", e);
throw new CredentialException(3, "secError00", e);
} finally {
cacertsIs.close();
}
}