summaryrefslogtreecommitdiffstats
path: root/apps/dsaparam.c
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:14 +0100
commitbf4ceeded1497c79e72fba4f9ff15febae58108d (patch)
tree43f9440ff190f53d5a5f3f89d7055f358613eb1b /apps/dsaparam.c
parent6e0b05f3008a3f22105fd2bed9314b0bfa381f93 (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)
Diffstat (limited to 'apps/dsaparam.c')
-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;