deps: @sigstore/verify@2.1.1 · npm/cli@f48613d · GitHub
Skip to content

Commit f48613d

Browse files
committed
deps: @sigstore/verify@2.1.1
1 parent a4c5e74 commit f48613d

6 files changed

Lines changed: 26 additions & 35 deletions

File tree

node_modules/@sigstore/verify/dist/key/certificate.js

Lines changed: 12 additions & 6 deletions

node_modules/@sigstore/verify/dist/key/index.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,10 @@ function verifyPublicKey(hint, timestamps, trustMaterial) {
3737
}
3838
function verifyCertificate(leaf, timestamps, trustMaterial) {
3939
// Check that leaf certificate chains to a trusted CA
40-
const path = (0, certificate_1.verifyCertificateChain)(leaf, trustMaterial.certificateAuthorities);
41-
// Check that ALL certificates are valid for ALL of the timestamps
42-
const validForDate = timestamps.every((timestamp) => path.every((cert) => cert.validForDate(timestamp)));
43-
if (!validForDate) {
44-
throw new error_1.VerificationError({
45-
code: 'CERTIFICATE_ERROR',
46-
message: 'certificate is not valid or expired at the specified date',
47-
});
48-
}
40+
let path = [];
41+
timestamps.forEach((timestamp) => {
42+
path = (0, certificate_1.verifyCertificateChain)(timestamp, leaf, trustMaterial.certificateAuthorities);
43+
});
4944
return {
5045
scts: (0, sct_1.verifySCTs)(path[0], path[1], trustMaterial.ctlogs),
5146
signer: getSigner(path[0]),

node_modules/@sigstore/verify/dist/timestamp/tsa.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ const trust_1 = require("../trust");
88
function verifyRFC3161Timestamp(timestamp, data, timestampAuthorities) {
99
const signingTime = timestamp.signingTime;
1010
// Filter for CAs which were valid at the time of signing
11-
timestampAuthorities = (0, trust_1.filterCertAuthorities)(timestampAuthorities, {
12-
start: signingTime,
13-
end: signingTime,
14-
});
11+
timestampAuthorities = (0, trust_1.filterCertAuthorities)(timestampAuthorities, signingTime);
1512
// Filter for CAs which match serial and issuer embedded in the timestamp
1613
timestampAuthorities = filterCAsBySerialAndIssuer(timestampAuthorities, {
1714
serialNumber: timestamp.signerSerialNumber,
@@ -44,6 +41,7 @@ function verifyTimestampForCA(timestamp, data, ca) {
4441
new certificate_1.CertificateChainVerifier({
4542
untrustedCert: leaf,
4643
trustedCerts: cas,
44+
timestamp: signingTime,
4745
}).verify();
4846
}
4947
catch (e) {
@@ -52,14 +50,6 @@ function verifyTimestampForCA(timestamp, data, ca) {
5250
message: 'invalid certificate chain',
5351
});
5452
}
55-
// Check that all of the CA certs were valid at the time of signing
56-
const validAtSigningTime = ca.certChain.every((cert) => cert.validForDate(signingTime));
57-
if (!validAtSigningTime) {
58-
throw new error_1.VerificationError({
59-
code: 'TIMESTAMP_ERROR',
60-
message: 'timestamp was signed with an expired certificate',
61-
});
62-
}
6353
// Check that the signing certificate's key can be used to verify the
6454
// timestamp signature.
6555
timestamp.verify(data, signingKey);

node_modules/@sigstore/verify/dist/trust/filter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Object.defineProperty(exports, "__esModule", { value: true });
33
exports.filterCertAuthorities = filterCertAuthorities;
44
exports.filterTLogAuthorities = filterTLogAuthorities;
5-
function filterCertAuthorities(certAuthorities, criteria) {
5+
function filterCertAuthorities(certAuthorities, timestamp) {
66
return certAuthorities.filter((ca) => {
7-
return (ca.validFor.start <= criteria.start && ca.validFor.end >= criteria.end);
7+
return ca.validFor.start <= timestamp && ca.validFor.end >= timestamp;
88
});
99
}
1010
// Filter the list of tlog instances to only those which match the given log

node_modules/@sigstore/verify/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sigstore/verify",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "Verification of Sigstore signatures",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -26,7 +26,7 @@
2626
"provenance": true
2727
},
2828
"dependencies": {
29-
"@sigstore/protobuf-specs": "^0.4.0",
29+
"@sigstore/protobuf-specs": "^0.4.1",
3030
"@sigstore/bundle": "^3.1.0",
3131
"@sigstore/core": "^2.0.0"
3232
},

package-lock.json

Lines changed: 4 additions & 4 deletions

0 commit comments

Comments
 (0)