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

Behavior of VerifyOptions.MaxSignatureAttempts #212

Closed
patrickzheng200 opened this issue Nov 22, 2022 · 2 comments
Closed

Behavior of VerifyOptions.MaxSignatureAttempts #212

patrickzheng200 opened this issue Nov 22, 2022 · 2 comments

Comments

@patrickzheng200
Copy link
Contributor

patrickzheng200 commented Nov 22, 2022

This issue tracks the behavior of VerifyOptions.MaxSignatureAttempts during notation.Verify(). As of 11//22/2022, we will have the following logics:

  1. Default of VerifyOptions.MaxSignatureAttempts is 0, when a user decides to use default, notation.Verify() would verify unlimited number of signatures associated with the artifact.
  2. User gives a positive number to VerifyOptions.MaxSignatureAttempts, notation.Verify() would verify at most VerifyOptions.MaxSignatureAttempts number of signatures associated with the artifact.
  3. User gives a negative number to VerifyOptions.MaxSignatureAttempts, same behavior as case 1.

@shizhMSFT @yizha1 @priteshbandi @rgnote Please leave your concerns/comments/suggestions if there's any.

@priteshbandi
Copy link
Contributor

priteshbandi commented Nov 22, 2022

Should we use 0 and -ve to default for unlimited or user can pass math.MaxInt64 which is unlimited for all practical purpose?

If we use later, it simplifies our code logic and makes it more readable for caller

@patrickzheng200
Copy link
Contributor Author

patrickzheng200 commented Nov 23, 2022

Closed this issue since we decided to not make change to current behavior in notation-go. In notation CLI, we will pass in a large number such as math.MaxInt64 as unlimited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants