Repository navigation
test(pro): pin the issuer public key by value - #61
Merged
Merged
Conversation
Every sold Pro token is signed by this key; the test now fails if the key is changed or dropped instead of comparing the constant with itself.
Contributor
There was a problem hiding this comment.
The test now pins the issuer key by its literal value (crates/lockdocs/src/pro.rs:67), which matches the shipped constant at pro.rs:10. Swapping or dropping the key now fails the test, so every sold token stays verifiable. CI is green on all three OS targets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Pro issuer key test now checks the key by its literal value, so changing or dropping the key fails the test. Before, it compared the policy with the same constant, which passes after any key swap.
Why
Every sold Pro token is signed by this key. A key that is replaced instead of added next to the old one would stop every sold licence from verifying.
How it was tested
A one-line test change, formatted with rustfmt;
cargo test --locked -p lockdocsis left to CI.