use of org.nhind.config.Certificate in project nhin-d by DirectProject.
the class RESTSmtpAgentConfigFunctional_Test method addCertificatesToConfig.
protected void addCertificatesToConfig(String certFilename, String keyFileName, String email) throws Exception {
byte[] dataToAdd = null;
if (keyFileName == null) {
// just load the cert
dataToAdd = loadCertificateData(certFilename);
} else {
dataToAdd = loadPkcs12FromCertAndKey(certFilename, keyFileName);
}
Certificate cert = new Certificate();
cert.setData(dataToAdd);
cert.setOwner(email);
proxy.addCertificates(new Certificate[] { cert });
}
Aggregations