summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-11-15 00:05:04 +0800
committerTomas Mraz <tomas@openssl.org>2021-11-16 17:33:38 +0100
commit20ca6f0ad1d621f7cd2b939b7e2e58ba29df2e08 (patch)
treecb019b4eedc82badadc972b72c898cd9b61d645e /apps
parent84201d47b4a8f2c358f014448d89dfde5c6217fe (diff)
EVP_PKEY_keygen_init: fix return check
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17031) (cherry picked from commit bf4ceeded1497c79e72fba4f9ff15febae58108d)
Diffstat (limited to 'apps')
-rw-r--r--apps/dsaparam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dsaparam.c b/apps/dsaparam.c
index df98532459..8025b8be67 100644
--- a/apps/dsaparam.c
+++ b/apps/dsaparam.c
@@ -211,7 +211,7 @@ int dsaparam_main(int argc, char **argv)
"Error, DSA key generation context allocation failed\n");
goto end;
}
- if (!EVP_PKEY_keygen_init(ctx)) {
+ if (EVP_PKEY_keygen_init(ctx) <= 0) {
BIO_printf(bio_err,
"Error, unable to initialise for key generation\n");
goto end;