Check public key is not NULL.
CVE-2015-0288 PR#3708 Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
437b14b533
commit
28a00bcd8e
@ -92,6 +92,8 @@ X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
|
|||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
pktmp = X509_get_pubkey(x);
|
pktmp = X509_get_pubkey(x);
|
||||||
|
if (pktmp == NULL)
|
||||||
|
goto err;
|
||||||
i = X509_REQ_set_pubkey(ret, pktmp);
|
i = X509_REQ_set_pubkey(ret, pktmp);
|
||||||
EVP_PKEY_free(pktmp);
|
EVP_PKEY_free(pktmp);
|
||||||
if (!i)
|
if (!i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user