diff options
author | Rich Salz <rsalz@akamai.com> | 2016-02-25 18:09:06 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-25 21:19:42 +0100 |
commit | 7c96dbcdab959fef74c4caae63cdebaa354ab252 (patch) | |
tree | af59789bb5bc85efd7e700d657db004910f8ba64 /apps | |
parent | Fix unified build after CT reorg (diff) | |
download | openssl-7c96dbcdab959fef74c4caae63cdebaa354ab252.tar.xz openssl-7c96dbcdab959fef74c4caae63cdebaa354ab252.zip |
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')
-rw-r--r-- | apps/genpkey.c | 3 | ||||
-rw-r--r-- | apps/req.c | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/apps/genpkey.c b/apps/genpkey.c index 905eb1992f..ca5d848266 100644 --- a/apps/genpkey.c +++ b/apps/genpkey.c @@ -317,8 +317,7 @@ int init_gen_str(EVP_PKEY_CTX **pctx, EVP_PKEY_asn1_get0_info(&pkey_id, NULL, NULL, NULL, NULL, ameth); #ifndef OPENSSL_NO_ENGINE - if (tmpeng) - ENGINE_finish(tmpeng); + ENGINE_finish(tmpeng); #endif ctx = EVP_PKEY_CTX_new_id(pkey_id, e); 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 } |