Add EVP_PKEY_get_params support for accessing key fields#11365
Add EVP_PKEY_get_params support for accessing key fields#11365slontis wants to merge 3 commits intoopenssl:masterfrom
Conversation
|
This is a replacement of #11352. It started out as just adding EC support, but quite a few changes also applied to the RSA code so it is easier just to merge them into a single cleaned up PR. |
7e788e9 to
295e398
Compare
|
@levitte I have reverted the multiprime changes in this PR. |
4096508 to
1e96783
Compare
1e96783 to
a996d8e
Compare
|
If you're introducing numbered OSSL_PARAM key names, then you should probably revert 45211c5 |
Although this doesnt actually exclude it from being used that way. For the RSA case it didnt sit well to do it as an unordered array - considering they are kind of ordered (since there is a triplet mapping going on for each index). |
I'm lost, what was the unordered part? |
You are correct - There was no unordered part for them :) |
|
ping |
Several of the PRFs replicate the same named item. |
1b3d820 to
c5f0f4c
Compare
|
24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually. |
502fb92 to
0af6b25
Compare
|
Rebased. |
|
@levitte - has to rebase (also addressed your nits). Does your approval still hold? |
|
Did you need to adjust more than util/libcrypto.num? If not, it still stands |
|
Sigh - Got a merge error in ec_kmgmt.c - so it does need another review now |
ded070d to
b728b11
Compare
|
Rebased yet again. |
b728b11 to
efecd1c
Compare
|
collapsed the commits so that if someone causes me yet another merge it wont be as bad. Changed EVP_PKEY_get_bn_param() so it cleanses the buffers it uses (Since it could be retrieving private data). |
…fields Currently only RSA, EC and ECX are supported (DH and DSA need to be added to the keygen PR's seperately because the fields supported have changed significantly). The API's require the keys to be provider based. Made the keymanagement export and get_params functions share the same code by supplying support functions that work for both a OSSL_PARAM_BLD as well as a OSSL_PARAM[]. This approach means that complex code is not required to build an empty OSSL_PARAM[] with the correct sized fields before then doing a second pass to populate the array. The RSA factor arrays have been changed to use unique key names to simplify the interface needed by the user.
efecd1c to
b7b155c
Compare
|
rebased to fix libcrypto.num - no reapproval is required. |
|
24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually. |
…fields Currently only RSA, EC and ECX are supported (DH and DSA need to be added to the keygen PR's seperately because the fields supported have changed significantly). The API's require the keys to be provider based. Made the keymanagement export and get_params functions share the same code by supplying support functions that work for both a OSSL_PARAM_BLD as well as a OSSL_PARAM[]. This approach means that complex code is not required to build an empty OSSL_PARAM[] with the correct sized fields before then doing a second pass to populate the array. The RSA factor arrays have been changed to use unique key names to simplify the interface needed by the user. Reviewed-by: Richard Levitte <[email protected]> (Merged from #11365)
|
Thanks.. Merged. |
Currently only RSA, EC and ECX are supported (DH and DSA need to be added to the keygen
PR's seperately because the fields supported have changed significantly).
Also added EVP_PKEY_gettable_params. Neither of these functions are dependant on any
particular operation - but they do require the keys to be provider based.
Made the export and get_params functions share the same code by supplying
support functions that work for both a OSSL_PARAM_BLD as well as a OSSL_PARAM[].
This approach means that complex code is not required to build an
empty OSSL_PARAM[] with the correct sized fields before then doing a second
pass to populate the array.
Checklist