summaryrefslogtreecommitdiffstats
path: root/src/crypto/x509/x509_req.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/x509/x509_req.c')
-rw-r--r--src/crypto/x509/x509_req.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crypto/x509/x509_req.c b/src/crypto/x509/x509_req.c
index daaedb6..2732d6e 100644
--- a/src/crypto/x509/x509_req.c
+++ b/src/crypto/x509/x509_req.c
@@ -92,6 +92,8 @@ X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
goto err;
pktmp = X509_get_pubkey(x);
+ if (pktmp == NULL)
+ goto err;
i=X509_REQ_set_pubkey(ret,pktmp);
EVP_PKEY_free(pktmp);
if (!i) goto err;