Closed
Conversation
This commit adds a new recipe to test EC key generation with the `genpkey` CLI app. For each built-in curve, it tests key generation with text output, in PEM and in DER format, using `explicit` and `named_curve` for parameters encoding. The list of built-in curves is static at the moment, as this allows to differentiate between prime curves and binary curves to avoid failing when ec2m is disabled.
!!!DO NOT MERGE!!! This commit should be dropped before merging !!!DO NOT MERGE!!! Test only P-256 and in the `-text` format only: this is to highlight the current failure with ec_param_enc:explicit.
This reverts commit da56060.
Make SM2 curve testing conditional to sm2 feature support. (cherry picked from commit 321ebf3)
Add more aliases (cherry picked from commit 5c87108)
Add extra negative test with unknown curve (cherry picked from commit e52dee3)
!!!DO NOT MERGE!!! This commit should be dropped before merging !!!DO NOT MERGE!!! Test only P-256 and in the `-text` format only: this is to highlight the current failure with ec_param_enc:explicit.
There currently do not support 'ec_param_enc:explicit' with provider side key generation. Reflect that by encoding the expected failure with a Test::More TODO section for those particular tests. Because the tests in this recipe are data driven, we implement this mechanism with two functions, one for stuff that's supported and one for stuff that isn't.
This reverts commit baf8fa8.
3 tasks
Member
|
Thanks @levitte ! (this is going to be useful in general for some more TDD I am doing at the moment) I am closing this as I cherry-picked your commit on #12080 and added a small cosmetic change moving the subroutines towards the beginning of the file to improve readability (at least to the eyes of someone that is not that fluent in Perl and spent a lot of time to understand the reference to the subroutines in the associative array!). |
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.
For @romen.
TEST: Add TODO segments in test/recipes/15-test_genec.t
There currently do not support 'ec_param_enc:explicit' with provider
side key generation. Reflect that by encoding the expected failure
with a Test::More TODO section for those particular tests.
Because the tests in this recipe are data driven, we implement this
mechanism with two functions, one for stuff that's supported and one
for stuff that isn't.