From c5ececc222963ea61137557f3c804ea72f5e8ca1 Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Tue, 4 Jun 2024 16:32:02 +0800 Subject: [PATCH] updated timestamping Signed-off-by: Patrick Zheng --- verifier/verifier.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/verifier/verifier.go b/verifier/verifier.go index 996fdd2a..8ac2919a 100644 --- a/verifier/verifier.go +++ b/verifier/verifier.go @@ -521,6 +521,7 @@ func verifyAuthenticTimestamp(ctx context.Context, trustPolicy *trustpolicy.Trus // under signing scheme notary.x509 if signerInfo := outcome.EnvelopeContent.SignerInfo; signerInfo.SignedAttributes.SigningScheme == signature.SigningSchemeX509 { + logger.Info("under signing scheme notary.x509...") performTimestampVerification := true timeStampLowerLimit := time.Now() timeStampUpperLimit := timeStampLowerLimit @@ -569,6 +570,7 @@ func verifyAuthenticTimestamp(ctx context.Context, trustPolicy *trustpolicy.Trus } } } + // this step is a success return ¬ation.ValidationResult{ Type: trustpolicy.TypeAuthenticTimestamp, Action: outcome.VerificationLevel.Enforcement[trustpolicy.TypeAuthenticTimestamp], @@ -700,6 +702,7 @@ func verifyAuthenticTimestamp(ctx context.Context, trustPolicy *trustpolicy.Trus } } else if signerInfo.SignedAttributes.SigningScheme == signature.SigningSchemeX509SigningAuthority { // under signing scheme notary.x509.signingAuthority + logger.Info("under signing scheme notary.x509.signingAuthority...") authenticSigningTime := signerInfo.SignedAttributes.SigningTime for _, cert := range signerInfo.CertificateChain { if authenticSigningTime.Before(cert.NotBefore) || authenticSigningTime.After(cert.NotAfter) {