@@ -8,10 +8,7 @@ const trust_1 = require("../trust");
88function 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 ) ;
0 commit comments