summaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2016-02-25 12:09:06 -0500
committerRich Salz <rsalz@openssl.org>2016-02-25 15:19:42 -0500
commit7c96dbcdab959fef74c4caae63cdebaa354ab252 (patch)
treeaf59789bb5bc85efd7e700d657db004910f8ba64 /apps/req.c
parent07b3ce8f8029f647c1babf0d8a03599885e7e284 (diff)
GH715: ENGINE_finish can take NULL
Simplifies calling code. Also fixed up any !ptr tests that were nearby, turning them into NULL tests. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/req.c b/apps/req.c
index 28ed036794..693acc22df 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -1376,8 +1376,7 @@ static EVP_PKEY_CTX *set_keygen_ctx(const char *gstr,
EVP_PKEY_asn1_get0_info(NULL, pkey_type, NULL, NULL, NULL, ameth);
#ifndef OPENSSL_NO_ENGINE
- if (tmpeng)
- ENGINE_finish(tmpeng);
+ ENGINE_finish(tmpeng);
#endif
if (*pkey_type == EVP_PKEY_RSA) {
if (p) {
@@ -1434,8 +1433,7 @@ static EVP_PKEY_CTX *set_keygen_ctx(const char *gstr,
EVP_PKEY_asn1_get0_info(NULL, NULL, NULL, NULL, &anam, ameth);
*palgnam = OPENSSL_strdup(anam);
#ifndef OPENSSL_NO_ENGINE
- if (tmpeng)
- ENGINE_finish(tmpeng);
+ ENGINE_finish(tmpeng);
#endif
}