OpenSSL 3 ECC Key use question

amartin at xtec.com amartin at xtec.com
Sun Oct 23 17:46:57 UTC 2022


Hi,

 

How can I get the nid from the curve name for a EC key in OpenSSL 3? I'm
porting code from OpenSSL 1.0.2.

 

I'm converting this:

 

ecc_curve_type = EC_GROUP_get_curve_name(EC_KEY_get0_group((const EC_KEY
*)eckey));

if(ecc_curve_type == NID_undef)

{

 

to

 

EVP_PKEY_get_utf8_string_param(pkey, OSSL_PKEY_PARAM_GROUP_NAME, curve_name,
sizeof(curve_name), &out_len);

ecc_curve_type = ossl_ec_curve_name2nid(curve_name);

 

but ossl_ec_curve_name2nid() is internal and it is not defined in
/include/openssl/ec.h but in /include/crypto/ec.h

 

Thanks,

 

Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20221023/bb3b202e/attachment.htm>


More information about the openssl-users mailing list