Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: verifyX509Time should return the verifier even if the verify fails (we want to get information about it later) #247

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dsse/dsse.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (e ErrNoMatchingSigs) Error() string {
if v.Error != nil {
kid, err := v.Verifier.KeyID()
if err != nil {
log.Warn("failed to get key id from verifier: %v", err)
log.Warnf("failed to get key id from verifier: %w", err)
}

s := fmt.Sprintf(" %s: %v\n", kid, v.Error)
Expand Down
6 changes: 2 additions & 4 deletions dsse/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ func verifyX509Time(cert *x509.Certificate, sigIntermediates, roots []*x509.Cert
return nil, err
}

if err := verifier.Verify(bytes.NewReader(pae), sig); err != nil {
return nil, err
}
err = verifier.Verify(bytes.NewReader(pae), sig)

return verifier, nil
return verifier, err
}
Loading