use of org.xipki.ca.server.impl.ocsp.OcspCertPublisher in project xipki by xipki.
the class CaManagerImpl method createPublisher.
// method createCertprofile
IdentifiedX509CertPublisher createPublisher(PublisherEntry dbEntry) throws CaMgmtException {
ParamUtil.requireNonNull("dbEntry", dbEntry);
String type = dbEntry.getType();
X509CertPublisher publisher;
IdentifiedX509CertPublisher ret;
try {
if ("OCSP".equalsIgnoreCase(type)) {
publisher = new OcspCertPublisher();
} else {
publisher = x509CertPublisherFactoryRegister.newPublisher(type);
}
ret = new IdentifiedX509CertPublisher(dbEntry, publisher);
ret.initialize(securityFactory.getPasswordResolver(), datasources);
return ret;
} catch (ObjectCreationException | CertPublisherException | RuntimeException ex) {
String msg = "invalid configuration for the publisher " + dbEntry.getIdent();
LogUtil.error(LOG, ex, msg);
throw new CaMgmtException(msg, ex);
}
}
Aggregations