Skip to content

Commit

Permalink
Check if len(errs) > 0
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Soyland <[email protected]>
  • Loading branch information
codysoyland committed Oct 29, 2024
1 parent 33690bc commit 0e08ce5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/verify/tsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func VerifyTimestampAuthority(entity SignedEntity, trustedMaterial root.TrustedM
verifiedTimestamps = append(verifiedTimestamps, verifiedSignedTimestamp)
}

if len(verifiedTimestamps) == 0 {
if len(verifiedTimestamps) == 0 && len(errs) > 0 {
return nil, fmt.Errorf("no verified signed timestamps: %w", errors.Join(errs...))
}
return verifiedTimestamps, nil
Expand Down

0 comments on commit 0e08ce5

Please sign in to comment.