// Check that unrevocation is not done on anything that can not be unrevoked
if (reason == RevokedCertInfo.NOT_REVOKED || reason == RevokedCertInfo.REVOCATION_REASON_REMOVEFROMCRL) {
if (info.getRevocationReason() != RevokedCertInfo.REVOCATION_REASON_CERTIFICATEHOLD) {
final String msg = intres.getLocalizedMessage("ra.errorunrevokenotonhold", issuerdn, certserno.toString(16));
logSession.log(admin, caid, LogConstants.MODULE_RA, new Date(), username, null, LogConstants.EVENT_INFO_REVOKEDENDENTITY, msg);
throw new AlreadyRevokedException(msg);
}
} else {
if (info.getRevocationReason() != RevokedCertInfo.NOT_REVOKED) {
final String msg = intres.getLocalizedMessage("ra.errorrevocationexists");
logSession.log(admin, caid, LogConstants.MODULE_RA, new Date(), username, null, LogConstants.EVENT_INFO_REVOKEDENDENTITY, msg);
throw new AlreadyRevokedException(msg);
}
}
if (endEntityProfileId!=-1 && certificateProfileId!=SecConst.CERTPROFILE_NO_PROFILE) {
// We can only perform this check if we have a trail of what eep and cp was used..
// Check if approvals is required.