ps.setNull(idx++, Types.INTEGER); ps.setInt(idx++, revInfo.getReason().getCode()); } else {
CrlReason currentReason = currentRevInfo.getReason(); if (!force) { if (currentReason != CrlReason.CERTIFICATE_HOLD) {
CrlReason currentReason = currentRevInfo.getReason(); if (currentReason == CrlReason.CERTIFICATE_HOLD) { if (revInfo.getReason() == CrlReason.CERTIFICATE_HOLD) { throw new OperationException(CERT_REVOKED, "certificate already revoked with the requested reason " ps.setLong(idx++, revInfo.getRevocationTime().getTime() / 1000); // revTimeSeconds setLong(ps, idx++, invTimeSeconds); ps.setInt(idx++, revInfo.getReason().getCode());
CrlReason currentReason = currentRevInfo.getReason(); if (currentReason != CrlReason.CERTIFICATE_HOLD) { throw new OperationException(CERT_REVOKED, "certificate is revoked but not with reason "
@Override public void revokeCa(String caName, CertRevocationInfo revocationInfo) throws CaMgmtException { caName = Args.toNonBlankLower(caName, "caName"); Args.notNull(revocationInfo, "revocationInfo"); asssertMasterMode(); if (!x509cas.containsKey(caName)) { throw new CaMgmtException(concat("unkown CA ", caName)); } LOG.info("revoking CA '{}'", caName); X509Ca ca = x509cas.get(caName); CertRevocationInfo currentRevInfo = ca.getCaInfo().getRevocationInfo(); if (currentRevInfo != null) { CrlReason currentReason = currentRevInfo.getReason(); if (currentReason != CrlReason.CERTIFICATE_HOLD) { throw new CaMgmtException(concat("CA ", caName, " has been revoked with reason ", currentReason.name())); } } queryExecutor.revokeCa(caName, revocationInfo); try { ca.revokeCa(revocationInfo, CaAuditConstants.MSGID_ca_mgmt); } catch (OperationException ex) { throw new CaMgmtException(concat("could not revoke CA ", ex.getMessage()), ex); } LOG.info("revoked CA '{}'", caName); auditLogPciEvent(true, concat("REVOKE CA ", caName)); } // method revokeCa
try { CertWithRevocationInfo ret = revokeCertificate0(caInfo.getSerialNumber(), revocationInfo.getReason(), revocationInfo.getInvalidityTime(), true, event); successful = (ret != null); } finally {
if (revocationInfo != null) { revInfoText = StringUtil.concatObjectsCap(30, "\n\treason: ", revocationInfo.getReason().getDescription(), "\n\trevoked at ", revocationInfo.getRevocationTime());
if (revocationInfo != null) { revInfoText = StringUtil.concatObjectsCap(30, "\n\treason: ", revocationInfo.getReason().getDescription(), "\n\trevoked at ", revocationInfo.getRevocationTime());