edockit 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/index.cjs.js +16 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +16 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -10565,11 +10565,23 @@ async function verifySignature(signatureInfo, files, options = {}) {
|
|
|
10565
10565
|
...options.revocationOptions,
|
|
10566
10566
|
});
|
|
10567
10567
|
certResult.revocation = revocationResult;
|
|
10568
|
-
// If certificate is revoked,
|
|
10568
|
+
// If certificate is revoked, check if signature was made before revocation (LTV)
|
|
10569
10569
|
if (revocationResult.status === "revoked") {
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10570
|
+
const revokedAt = revocationResult.revokedAt;
|
|
10571
|
+
// Long-Term Validation: if we have a trusted timestamp proving the signature
|
|
10572
|
+
// was made before revocation, the signature is still valid
|
|
10573
|
+
if (revokedAt && trustedSigningTime < revokedAt) {
|
|
10574
|
+
// Signature was made before revocation - still valid (LTV)
|
|
10575
|
+
certResult.revocation.isValid = true;
|
|
10576
|
+
certResult.revocation.reason = `Certificate was revoked on ${revokedAt.toISOString()}, but signature was made on ${trustedSigningTime.toISOString()} (before revocation)`;
|
|
10577
|
+
}
|
|
10578
|
+
else {
|
|
10579
|
+
// Signature was made after revocation or no revocation date available
|
|
10580
|
+
certResult.isValid = false;
|
|
10581
|
+
const revokedAtStr = revokedAt ? ` on ${revokedAt.toISOString()}` : "";
|
|
10582
|
+
certResult.reason = `Certificate was revoked${revokedAtStr}`;
|
|
10583
|
+
errors.push(`Certificate revoked${revokedAtStr}`);
|
|
10584
|
+
}
|
|
10573
10585
|
}
|
|
10574
10586
|
// Note: 'unknown' status is a soft fail - certificate remains valid
|
|
10575
10587
|
// but user can check revocation.status to see if it couldn't be verified
|