diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-06-20 12:10:06 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-06-23 15:47:15 +0200 |
commit | 95a6fbdf0d112582b9ad56f8d42ec92b1ec4787d (patch) | |
tree | a8042fde3c2caef0817f8fba32d5e8b52a4a5c00 /crypto/ec/ec_backend.c | |
parent | put_str: Use memcpy instead of strncpy (diff) | |
download | openssl-95a6fbdf0d112582b9ad56f8d42ec92b1ec4787d.tar.xz openssl-95a6fbdf0d112582b9ad56f8d42ec92b1ec4787d.zip |
The flag "decoded-from-explicit" must be imp/exportable
Otherwise the information that the EC group was imported from
explicit parameters is lost when the key is moved across providers.
Fixes #18600
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/18609)
Diffstat (limited to 'crypto/ec/ec_backend.c')
-rw-r--r-- | crypto/ec/ec_backend.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/ec/ec_backend.c b/crypto/ec/ec_backend.c index bea01fb38f..48721369ae 100644 --- a/crypto/ec/ec_backend.c +++ b/crypto/ec/ec_backend.c @@ -318,6 +318,11 @@ int ossl_ec_group_todata(const EC_GROUP *group, OSSL_PARAM_BLD *tmpl, return 0; } + if (!ossl_param_build_set_int(tmpl, params, + OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS, + group->decoded_from_explicit_params)) + return 0; + curve_nid = EC_GROUP_get_curve_name(group); /* |