@@ -287,29 +287,6 @@ func TestAuthenticTimestamp(t *testing.T) {
287287 }
288288 })
289289
290- t .Run ("verify Authentic Timestamp failed due to signing time after timestamp value" , func (t * testing.T ) {
291- signedToken , err := os .ReadFile ("testdata/timestamp/countersignature/TimeStampToken.p7s" )
292- if err != nil {
293- t .Fatalf ("failed to get signedToken: %v" , err )
294- }
295- envContent , err := parseEnvContent ("testdata/timestamp/sigEnv/withoutTimestamp.sig" , jws .MediaTypeEnvelope )
296- if err != nil {
297- t .Fatalf ("failed to get signature envelope content: %v" , err )
298- }
299- envContent .SignerInfo .UnsignedAttributes .TimestampSignature = signedToken
300- envContent .SignerInfo .Signature = []byte ("notation" )
301- envContent .SignerInfo .SignedAttributes .SigningTime = time .Date (3000 , time .November , 10 , 23 , 0 , 0 , 0 , time .UTC )
302- outcome := & notation.VerificationOutcome {
303- EnvelopeContent : envContent ,
304- VerificationLevel : trustpolicy .LevelStrict ,
305- }
306- authenticTimestampResult := verifyAuthenticTimestamp (context .Background (), dummyTrustPolicy .Name , dummyTrustPolicy .TrustStores , dummyTrustPolicy .SignatureVerification , trustStore , revocationTimestampingValidator , outcome )
307- expectedErrMsg := "timestamp [2021-09-17T14:09:09Z, 2021-09-17T14:09:11Z] is not bounded after the signing time \" 3000-11-10 23:00:00 +0000 UTC\" "
308- if err := authenticTimestampResult .Error ; err == nil || err .Error () != expectedErrMsg {
309- t .Fatalf ("expected %s, but got %s" , expectedErrMsg , err )
310- }
311- })
312-
313290 t .Run ("verify Authentic Timestamp failed due to trust store does not exist" , func (t * testing.T ) {
314291 dummyTrustPolicy := & trustpolicy.TrustPolicy {
315292 Name : "test-timestamp" ,
0 commit comments