mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
Allocates and initializes pubkey in X509_PUBKEY_dup()
Fixes #14617 Signed-off-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14642)
This commit is contained in:
parent
a638fb9413
commit
f0800c7c22
@ -209,7 +209,8 @@ X509_PUBKEY *X509_PUBKEY_dup(const X509_PUBKEY *a)
|
||||
{
|
||||
X509_PUBKEY *pubkey = NULL;
|
||||
|
||||
if (!x509_pubkey_ex_new(NULL, ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL))
|
||||
if (!x509_pubkey_ex_new((ASN1_VALUE **)&pubkey,
|
||||
ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL))
|
||||
|| !x509_pubkey_set0_libctx(pubkey, a->libctx, a->propq)
|
||||
|| (pubkey->algor = X509_ALGOR_dup(a->algor)) == NULL
|
||||
|| (pubkey->public_key = ASN1_BIT_STRING_new()) == NULL
|
||||
|
Loading…
Reference in New Issue
Block a user