Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Zheng <[email protected]>
  • Loading branch information
Two-Hearts committed Sep 18, 2023
1 parent a1e4faf commit 2606b29
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions notation.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,7 @@ func Verify(ctx context.Context, verifier Verifier, repo registry.Repository, ve

var verificationSucceeded bool
var verificationOutcomes []*VerificationOutcome
var verificationFailedErr error = ErrorVerificationFailed{}
var verificationFailedErrorArray = []error{verificationFailedErr}
var verificationFailedErrorArray = []error{ErrorVerificationFailed{}}
errExceededMaxVerificationLimit := ErrorVerificationFailed{Msg: fmt.Sprintf("signature evaluation stopped. The configured limit of %d signatures to verify per artifact exceeded", verifyOpts.MaxSignatureAttempts)}
numOfSignatureProcessed := 0

Expand Down Expand Up @@ -418,8 +417,7 @@ func Verify(ctx context.Context, verifier Verifier, repo registry.Repository, ve
// Verification Failed
if !verificationSucceeded {
logger.Debugf("Signature verification failed for all the signatures associated with artifact %v", artifactDescriptor.Digest)
verificationFailedErr = errors.Join(verificationFailedErrorArray...)
return ocispec.Descriptor{}, verificationOutcomes, verificationFailedErr
return ocispec.Descriptor{}, verificationOutcomes, errors.Join(verificationFailedErrorArray...)
}

// Verification Succeeded
Expand Down

0 comments on commit 2606b29

Please sign in to comment.