openssl: add ecc_pkey_new(), ecc_pkey_from_curve_x_y(), ecc_pkey_to_curve_x_y()
authorDan Streetman <ddstreet@ieee.org>
Tue, 4 Jul 2023 22:52:59 +0000 (18:52 -0400)
committerDan Streetman <ddstreet@ieee.org>
Fri, 4 Aug 2023 14:57:08 +0000 (10:57 -0400)
commit900e73f80e87df2295faabd66f66d42c973d8ad6
tree6ef8ac19d5d5d6b90b505929146989c50c0e667a
parentdcec950ca1c122a3e02798f9501db459cb97552f
openssl: add ecc_pkey_new(), ecc_pkey_from_curve_x_y(), ecc_pkey_to_curve_x_y()

Add function to create openssl pkey from ECC curve and point, and function to
get curve id and x/y point from existing ECC pkey. Also add function to create
new ECC key for specified curve.

Also add DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_MACRO() to handle case when func() is
a macro, not a function symbol; specifically in this case it is used for
OPENSSL_free() which is a macro.
src/basic/macro.h
src/shared/openssl-util.c
src/shared/openssl-util.h