Repository navigation
Conversation
rnp_key_is_compromised(), rnp_key_is_retired() and rnp_key_is_superseded() returned RNP_ERROR_BAD_PARAMETERS for a key which is not revoked at all, which is a normal key state, so callers could not distinguish a healthy key from an actual problem and had to map the error to false by hand. The predicates now succeed with false for a non-revoked key, matching the behaviour of the sibling predicates rnp_key_is_revoked() and rnp_key_is_valid(). An invalid key handle continues to return RNP_ERROR_BAD_PARAMETERS. Fixes #2467.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2488 +/- ##
=======================================
Coverage 85.45% 85.46%
=======================================
Files 125 125
Lines 23042 23043 +1
=======================================
+ Hits 19691 19693 +2
+ Misses 3351 3350 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2 of 3 tasks
This branch has not been deployed
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.
Summary
rnp_key_is_compromised(),rnp_key_is_retired()andrnp_key_is_superseded()returnedRNP_ERROR_BAD_PARAMETERSwhen the queried key was not revoked, although a key which is not revoked is a normal state rather than a failure. Callers therefore had to map the error code to false by hand and could not distinguish a healthy key from an actual problem, while the sibling predicatesrnp_key_is_revoked()andrnp_key_is_valid()already succeed with a boolean for the same state, as reported in rnp_key_is_compromised/retired/superseded return RNP_ERROR_BAD_PARAMETERS for keys that are not revoked #2467.falsefor a key which is not revoked at all, andRNP_ERROR_BAD_PARAMETERSremains reserved for an invalid key handle.rnp_key_is_revoked_with_code()helper, together with a regression test which exercises all three predicates on a non-revoked key insidetest_ffi_revocations.Test plan
rnp_tests.test_ffi_revocationspasses with the new assertions on a non-revoked key