Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
  • Loading branch information
Two-Hearts committed Dec 19, 2022
1 parent 3456d2f commit 92b16a5
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 @@ -99,14 +99,14 @@ func runVerify(command *cobra.Command, opts *verifyOpts) error {
MaxSignatureAttempts: math.MaxInt64,
}

// core verify process.
// core verify process
_, outcomes, err := notation.Verify(ctx, verifier, sigRepo, verifyOpts)
// write out on failure
if err != nil || len(outcomes) == 0 {
if err != nil {
var errorVerificationFailed *notation.ErrorVerificationFailed
if !errors.As(err, &errorVerificationFailed) {
return fmt.Errorf("signature verification failed due to: %w", err)
return fmt.Errorf("signature verification failed: %w", err)
}
}
return fmt.Errorf("signature verification failed for all the signatures associated with %s", ref.String())
Expand Down

0 comments on commit 92b16a5

Please sign in to comment.