OpenSSL: Mark crypto_ec_key_gen() key compressed
Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
This commit is contained in:
parent
86cde01cbd
commit
63bf3d25ab
1 changed files with 8 additions and 1 deletions
|
@ -2245,7 +2245,7 @@ fail:
|
|||
struct crypto_ec_key * crypto_ec_key_gen(int group)
|
||||
{
|
||||
EVP_PKEY_CTX *kctx = NULL;
|
||||
EC_KEY *ec_params = NULL;
|
||||
EC_KEY *ec_params = NULL, *eckey;
|
||||
EVP_PKEY *params = NULL, *key = NULL;
|
||||
int nid;
|
||||
|
||||
|
@ -2278,6 +2278,13 @@ struct crypto_ec_key * crypto_ec_key_gen(int group)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
eckey = EVP_PKEY_get0_EC_KEY(key);
|
||||
if (!eckey) {
|
||||
key = NULL;
|
||||
goto fail;
|
||||
}
|
||||
EC_KEY_set_conv_form(eckey, POINT_CONVERSION_COMPRESSED);
|
||||
|
||||
fail:
|
||||
EC_KEY_free(ec_params);
|
||||
EVP_PKEY_free(params);
|
||||
|
|
Loading…
Reference in a new issue