refactor: implement match the same for all pkeys #5224
Merged
+317
−275
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.
Release Summary:
Resolved issues:
related to #5149
Description of changes:
Step one of cleaning up the legacy pkey logic: move the
match
method out of the individual pkey implementations and into the main shared logic.match
should always be implemented the same, rather than each implementation re-writing the same sign/verify logic.Call-outs:
RSA-PSS was doing some additional validation, not just sign/verify. However, I don't believe that logic is necessary if we're going to sign/verify anyway. Seems unnecessary. But let me know if you think I'm missing something that makes it necessary / useful.
Testing:
Added a new unit test. Future PRs will add more tests to the new s2n_pkey_test file.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.