mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-11-24 22:45:48 +00:00
Update src/key/helper.js
Co-authored-by: larabr <larabr+github@protonmail.com>
This commit is contained in:
parent
ebfb5b1085
commit
19870b9ab7
@ -281,15 +281,14 @@ export async function isDataRevoked(primaryKey, signatureType, dataToVerify, rev
|
|||||||
// `verifyAllCertifications`.)
|
// `verifyAllCertifications`.)
|
||||||
!signature || revocationSignature.issuerKeyID.equals(signature.issuerKeyID)
|
!signature || revocationSignature.issuerKeyID.equals(signature.issuerKeyID)
|
||||||
) {
|
) {
|
||||||
if (![
|
const isHardRevocation = ![
|
||||||
enums.reasonForRevocation.keyRetired,
|
enums.reasonForRevocation.keyRetired,
|
||||||
enums.reasonForRevocation.keySuperseded,
|
enums.reasonForRevocation.keySuperseded,
|
||||||
enums.reasonForRevocation.userIDInvalid
|
enums.reasonForRevocation.userIDInvalid
|
||||||
].includes(revocationSignature.reasonForRevocationFlag)) {
|
].includes(revocationSignature.reasonForRevocationFlag);
|
||||||
date = null; // Hard revocations apply at any time.
|
|
||||||
}
|
|
||||||
await revocationSignature.verify(
|
await revocationSignature.verify(
|
||||||
key, signatureType, dataToVerify, date, false, config
|
key, signatureType, dataToVerify, isHardRevocation ? null : date, false, config
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO get an identifier of the revoked object instead
|
// TODO get an identifier of the revoked object instead
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user