public static CertRevocationInfo fromEncoded(String encoded) { ConfPairs pairs = new ConfPairs(encoded); CrlReason reason = CrlReason.forNameOrText(pairs.value("reason")); Date revocationTime = new Date(1000L * Long.parseLong(pairs.value("revocationTime"))); String str = pairs.value("invalidityTime"); Date invalidityTime = null; if (str != null) { invalidityTime = new Date(1000L * Long.parseLong(pairs.value("invalidityTime"))); } return new CertRevocationInfo(reason, revocationTime, invalidityTime); }
CertRevocationInfo revInfo = new CertRevocationInfo(revReason, new Date(revTime * 1000), invalidityTime); certInfo.setRevocationInfo(revInfo);
if (revoked) { Date invalidityTime = (revInvTime == 0) ? null : new Date(1000 * revInvTime); revInfo = new CertRevocationInfo(revReason, new Date(1000 * revTime), invalidityTime);
@Override protected Object execute0() throws Exception { CrlReason crlReason = CrlReason.forNameOrText(reason); if (!PERMITTED_REASONS.contains(crlReason)) { throw new IllegalCmdParamException("reason " + reason + " is not permitted"); } if (!caManager.getCaNames().contains(caName)) { throw new IllegalCmdParamException("invalid CA name " + caName); } Date revocationDate = null; revocationDate = isNotBlank(revocationDateS) ? DateUtil.parseUtcTimeyyyyMMddhhmmss(revocationDateS) : new Date(); Date invalidityDate = null; if (isNotBlank(invalidityDateS)) { invalidityDate = DateUtil.parseUtcTimeyyyyMMddhhmmss(invalidityDateS); } CertRevocationInfo revInfo = new CertRevocationInfo(crlReason, revocationDate, invalidityDate); boolean bo = caManager.revokeCa(caName, revInfo); output(bo, "revoked", "could not revoke", "CA " + caName); return null; } // method execute0
CertRevocationInfo revInfo = new CertRevocationInfo(revReason, new Date(revTime * 1000), invalidityTime); certInfo.setRevocationInfo(revInfo);
@Override protected Object execute0() throws Exception { CrlReason crlReason = CrlReason.forNameOrText(reason); if (!PERMITTED_REASONS.contains(crlReason)) { throw new IllegalCmdParamException("reason " + reason + " is not permitted"); } if (!caManager.getCaNames().contains(caName)) { throw new IllegalCmdParamException("invalid CA name " + caName); } Date revocationDate = null; revocationDate = isNotBlank(revocationDateS) ? DateUtil.parseUtcTimeyyyyMMddhhmmss(revocationDateS) : new Date(); Date invalidityDate = null; if (isNotBlank(invalidityDateS)) { invalidityDate = DateUtil.parseUtcTimeyyyyMMddhhmmss(invalidityDateS); } CertRevocationInfo revInfo = new CertRevocationInfo(crlReason, revocationDate, invalidityDate); String msg = "CA " + caName; try { caManager.revokeCa(caName, revInfo); println("revoked " + msg); return null; } catch (CaMgmtException ex) { throw new CmdFailure("could not revoke " + msg + ", error: " + ex.getMessage(), ex); } } // method execute0
CertRevocationInfo revInfo = new CertRevocationInfo(reason, new Date(), invalidityTime); revokedCert = certstore.revokeCert(caIdent, serialNumber, revInfo, force, shouldPublishToDeltaCrlCache(), caIdNameMap);