update pkey method initialisation and copy
This commit is contained in:
parent
cb70355d87
commit
6841abe842
2 changed files with 10 additions and 0 deletions
|
@ -293,6 +293,8 @@ EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags,
|
|||
if (!ameth)
|
||||
return NULL;
|
||||
|
||||
memset(ameth, 0, sizeof(EVP_PKEY_ASN1_METHOD));
|
||||
|
||||
ameth->pkey_id = id;
|
||||
ameth->pkey_base_id = id;
|
||||
ameth->pkey_flags = flags | ASN1_PKEY_DYNAMIC;
|
||||
|
@ -327,6 +329,9 @@ EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags,
|
|||
ameth->old_priv_encode = 0;
|
||||
ameth->old_priv_decode = 0;
|
||||
|
||||
ameth->item_verify = 0;
|
||||
ameth->item_sign = 0;
|
||||
|
||||
ameth->pkey_size = 0;
|
||||
ameth->pkey_bits = 0;
|
||||
|
||||
|
@ -378,6 +383,9 @@ void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
|
|||
dst->pkey_free = src->pkey_free;
|
||||
dst->pkey_ctrl = src->pkey_ctrl;
|
||||
|
||||
dst->item_sign = src->item_sign;
|
||||
dst->item_verify = src->item_verify;
|
||||
|
||||
}
|
||||
|
||||
void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth)
|
||||
|
|
|
@ -204,6 +204,8 @@ EVP_PKEY_METHOD* EVP_PKEY_meth_new(int id, int flags)
|
|||
if (!pmeth)
|
||||
return NULL;
|
||||
|
||||
memset(pmeth, 0, sizeof(EVP_PKEY_METHOD));
|
||||
|
||||
pmeth->pkey_id = id;
|
||||
pmeth->flags = flags | EVP_PKEY_FLAG_DYNAMIC;
|
||||
|
||||
|
|
Loading…
Reference in a new issue