diff options
author | Oliver Mihatsch <oliver.mihatsch@virtual-solution.com> | 2023-02-02 12:15:14 +0100 |
---|---|---|
committer | Todd Short <todd.short@me.com> | 2023-02-08 10:27:07 -0500 |
commit | a8aad913ecc632405096b2b61942b2c782cc74f4 (patch) | |
tree | 50d837c6a5166070c7012e619c0eece502f92231 /include/openssl | |
parent | ee17148792943f7f6455213a3b9a86a4cc082c9a (diff) | |
download | openssl-new-a8aad913ecc632405096b2b61942b2c782cc74f4.tar.gz |
New function EC_GROUP_to_params to convert an EC_GROUP to an array of OSSL_PARAM.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/20205)
Diffstat (limited to 'include/openssl')
-rw-r--r-- | include/openssl/ec.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/openssl/ec.h b/include/openssl/ec.h index be9fb2f089..3089dfccd4 100644 --- a/include/openssl/ec.h +++ b/include/openssl/ec.h @@ -461,6 +461,22 @@ EC_GROUP *EC_GROUP_new_from_params(const OSSL_PARAM params[], OSSL_LIB_CTX *libctx, const char *propq); /** + * Creates an OSSL_PARAM array with the parameters describing the given + * EC_GROUP. + * The resulting parameters may contain an explicit or a named curve depending + * on the EC_GROUP. + * \param group pointer to the EC_GROUP object + * \param libctx The associated library context or NULL for the default + * context + * \param propq A property query string + * \param bnctx BN_CTX object (optional) + * \return newly created OSSL_PARAM array with the parameters + * describing the given EC_GROUP or NULL if an error occurred + */ +OSSL_PARAM *EC_GROUP_to_params(const EC_GROUP *group, OSSL_LIB_CTX *libctx, + const char *propq, BN_CTX *bnctx); + +/** * Creates a EC_GROUP object with a curve specified by a NID * \param libctx The associated library context or NULL for the default * context |