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

Verify command returns the parsed timestamp #174

Merged

Conversation

malancas
Copy link
Contributor

@malancas malancas commented Dec 8, 2022

Signed-off-by: Meredith Lancaster [email protected]

Summary

Closes #169

The verify CLI command now returns the parsed timestamp when verification is successful.

Release Note

Documentation

Signed-off-by: Meredith Lancaster <[email protected]>
@malancas malancas marked this pull request as ready for review December 9, 2022 14:41
@malancas malancas requested a review from a team as a code owner December 9, 2022 14:41
haydentherapper
haydentherapper previously approved these changes Dec 9, 2022
Copy link
Contributor

@haydentherapper haydentherapper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

}
return fmt.Errorf("error parsing response into Timestamp: %w", err)
return nil, fmt.Errorf("error parsing response into Timestamp: %w", err)
}

// verify the timestamp response signature using the provided certificate pool
err = verifyTSRWithChain(ts, opts)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit for readability, can you change these to be:

if err := func(); err != nil {
  return nil, err
}

Signed-off-by: Meredith Lancaster <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #174 (03b9732) into main (c9b8a1a) will decrease coverage by 0.13%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             main     #174      +/-   ##
==========================================
- Coverage   48.17%   48.03%   -0.14%     
==========================================
  Files          18       18              
  Lines        1067     1068       +1     
==========================================
- Hits          514      513       -1     
- Misses        495      497       +2     
  Partials       58       58              
Impacted Files Coverage Δ
cmd/timestamp-cli/app/verify.go 10.94% <0.00%> (-0.17%) ⬇️
pkg/verification/verify.go 62.04% <33.33%> (-0.23%) ⬇️
pkg/signer/memory.go 63.15% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@haydentherapper haydentherapper merged commit 11d03c7 into sigstore:main Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide the timestamp value from a “verify timestamp” API
3 participants