Skip to content

Amendment to #12080#12097

Closed
levitte wants to merge 9 commits intoopenssl:masterfrom
levitte:romen-issues/3.0.0/ec_explicit_params_encoding
Closed

Amendment to #12080#12097
levitte wants to merge 9 commits intoopenssl:masterfrom
levitte:romen-issues/3.0.0/ec_explicit_params_encoding

Conversation

@levitte
Copy link
Member

@levitte levitte commented Jun 9, 2020

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.

romen and others added 9 commits June 7, 2020 21:22
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.
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.
@romen
Copy link
Member

romen commented Jun 9, 2020

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!).

@romen romen closed this Jun 9, 2020
@levitte levitte deleted the romen-issues/3.0.0/ec_explicit_params_encoding branch October 31, 2020 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants