add "missing" functions to copy EVP_PKEY_METHOD and examine info
This commit is contained in:
parent
95eef4df79
commit
a618011ca1
3
CHANGES
3
CHANGES
@ -4,6 +4,9 @@
|
||||
|
||||
Changes between 1.0.0b and 1.0.1 [xx XXX xxxx]
|
||||
|
||||
*) Add functions to copy EVP_PKEY_METHOD and retrieve flags and id.
|
||||
[Steve Henson]
|
||||
|
||||
*) Add EC_GFp_nistp224_method(), a 64-bit optimized implementation for
|
||||
elliptic curve NIST-P224 with constant-time single point multiplication on
|
||||
typical inputs. EC_GROUP_new_by_curve_name() will automatically use this
|
||||
|
@ -1049,6 +1049,9 @@ void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,
|
||||
|
||||
const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
|
||||
EVP_PKEY_METHOD* EVP_PKEY_meth_new(int id, int flags);
|
||||
void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
|
||||
const EVP_PKEY_METHOD *meth);
|
||||
void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);
|
||||
void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
|
||||
int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
|
||||
|
||||
|
@ -235,6 +235,56 @@ EVP_PKEY_METHOD* EVP_PKEY_meth_new(int id, int flags)
|
||||
return pmeth;
|
||||
}
|
||||
|
||||
void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
|
||||
const EVP_PKEY_METHOD *meth)
|
||||
{
|
||||
if (ppkey_id)
|
||||
*ppkey_id = meth->pkey_id;
|
||||
if (pflags)
|
||||
*pflags = meth->flags;
|
||||
}
|
||||
|
||||
void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src)
|
||||
{
|
||||
|
||||
dst->init = src->init;
|
||||
dst->copy = src->copy;
|
||||
dst->cleanup = src->cleanup;
|
||||
|
||||
dst->paramgen_init = src->paramgen_init;
|
||||
dst->paramgen = src->paramgen;
|
||||
|
||||
dst->keygen_init = src->keygen_init;
|
||||
dst->keygen = src->keygen;
|
||||
|
||||
dst->sign_init = src->sign_init;
|
||||
dst->sign = src->sign;
|
||||
|
||||
dst->verify_init = src->verify_init;
|
||||
dst->verify = src->verify;
|
||||
|
||||
dst->verify_recover_init = src->verify_recover_init;
|
||||
dst->verify_recover = src->verify_recover;
|
||||
|
||||
dst->signctx_init = src->signctx_init;
|
||||
dst->signctx = src->signctx;
|
||||
|
||||
dst->verifyctx_init = src->verifyctx_init;
|
||||
dst->verifyctx = src->verifyctx;
|
||||
|
||||
dst->encrypt_init = src->encrypt_init;
|
||||
dst->encrypt = src->encrypt;
|
||||
|
||||
dst->decrypt_init = src->decrypt_init;
|
||||
dst->decrypt = src->decrypt;
|
||||
|
||||
dst->derive_init = src->derive_init;
|
||||
dst->derive = src->derive;
|
||||
|
||||
dst->ctrl = src->ctrl;
|
||||
dst->ctrl_str = src->ctrl_str;
|
||||
}
|
||||
|
||||
void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth)
|
||||
{
|
||||
if (pmeth && (pmeth->flags & EVP_PKEY_FLAG_DYNAMIC))
|
||||
|
Loading…
Reference in New Issue
Block a user