if (log.isDebugEnabled()) {
log.debug("Using CA from username: "+req.getUsername());
}
} else {
String msg = intres.getLocalizedMessage("signsession.canotfoundissuerusername", dn, "null");
throw new CADoesntExistsException(msg);
}
}
} else if (req.getUsername() != null) {
ca = getCAFromUsername(admin, req);
if (log.isDebugEnabled()) {
log.debug("Using CA from username: "+req.getUsername());
}
} else {
throw new CADoesntExistsException(intres.getLocalizedMessage("signsession.canotfoundissuerusername", req.getIssuerDN(), req.getUsername()));
}
} catch (ObjectNotFoundException e) {
throw new CADoesntExistsException(intres.getLocalizedMessage("signsession.canotfoundissuerusername", req.getIssuerDN(), req.getUsername()));
}
if (ca.getStatus() != SecConst.CA_ACTIVE) {
String msg = intres.getLocalizedMessage("signsession.canotactive", ca.getSubjectDN());
logSession.log(admin, ca.getCAId(), LogConstants.MODULE_CA, new java.util.Date(), null, null, LogConstants.EVENT_ERROR_CREATECERTIFICATE, msg);