From ebfb5b1085fb6b1af78f0c7ba352b1aae8e5c5aa Mon Sep 17 00:00:00 2001 From: Daniel Huigens Date: Wed, 3 Jul 2024 14:42:01 +0200 Subject: [PATCH] Let hard revocations apply at any time --- src/key/helper.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/key/helper.js b/src/key/helper.js index 9425ebf8..763e66b3 100644 --- a/src/key/helper.js +++ b/src/key/helper.js @@ -281,6 +281,13 @@ export async function isDataRevoked(primaryKey, signatureType, dataToVerify, rev // `verifyAllCertifications`.) !signature || revocationSignature.issuerKeyID.equals(signature.issuerKeyID) ) { + if (![ + enums.reasonForRevocation.keyRetired, + enums.reasonForRevocation.keySuperseded, + enums.reasonForRevocation.userIDInvalid + ].includes(revocationSignature.reasonForRevocationFlag)) { + date = null; // Hard revocations apply at any time. + } await revocationSignature.verify( key, signatureType, dataToVerify, date, false, config );