diff --git a/cmd/notation/verify.go b/cmd/notation/verify.go index 4565abeb9..e880aa25e 100644 --- a/cmd/notation/verify.go +++ b/cmd/notation/verify.go @@ -27,6 +27,7 @@ import ( "github.com/notaryproject/notation-core-go/revocation/purpose" "github.com/notaryproject/notation-go" "github.com/notaryproject/notation-go/dir" + "github.com/notaryproject/notation-go/log" "github.com/notaryproject/notation-go/plugin" "github.com/notaryproject/notation-go/verifier" "github.com/notaryproject/notation-go/verifier/crl" @@ -232,6 +233,8 @@ func printMetadataIfPresent(outcome *notation.VerificationOutcome) { } func getVerifier(ctx context.Context) (notation.Verifier, error) { + logger := log.GetLogger(ctx) + // revocation check ocspHttpClient := httputil.NewClient(ctx, &http.Client{Timeout: 2 * time.Second}) crlFetcher, err := corecrl.NewHTTPFetcher(httputil.NewClient(ctx, &http.Client{Timeout: 5 * time.Second})) @@ -246,6 +249,7 @@ func getVerifier(ctx context.Context) (notation.Verifier, error) { if err != nil { return nil, err } + logger.Warnln("Discard any crl cache error") crlFetcher.DiscardCacheError = true // discard cache error revocationCodeSigningValidator, err := revocation.NewWithOptions(revocation.Options{ OCSPHTTPClient: ocspHttpClient,