Skip to content

Commit

Permalink
fix: fixed global variable verifier (notaryproject#676)
Browse files Browse the repository at this point in the history
This PR quick fixed `verifier` in verify.go.

Signed-off-by: Patrick Zheng <[email protected]>
  • Loading branch information
Two-Hearts authored May 22, 2023
1 parent c55aab0 commit 58bde11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/notation/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 58bde11

Please sign in to comment.