From 448401b0b530d70bedb1dd27bac32170749ea31d Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Mon, 22 May 2023 11:34:22 +0800 Subject: [PATCH] fixed verifier Signed-off-by: Patrick Zheng --- cmd/notation/verify.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/notation/verify.go b/cmd/notation/verify.go index 6b038884b..10561661d 100644 --- a/cmd/notation/verify.go +++ b/cmd/notation/verify.go @@ -94,7 +94,7 @@ func runVerify(command *cobra.Command, opts *verifyOpts) error { ctx := opts.LoggingFlagOpts.SetLoggerLevel(command.Context()) // initialize - verifier, err := verifier.NewFromConfig() + sigVerifier, err := verifier.NewFromConfig() if err != nil { return err } @@ -131,7 +131,7 @@ func runVerify(command *cobra.Command, opts *verifyOpts) error { MaxSignatureAttempts: maxSignatureAttempts, UserMetadata: userMetadata, } - _, outcomes, err := notation.Verify(ctx, verifier, sigRepo, verifyOpts) + _, outcomes, err := notation.Verify(ctx, sigVerifier, sigRepo, verifyOpts) err = checkVerificationFailure(outcomes, resolvedRef, err) if err != nil { return err