summaryrefslogtreecommitdiffstats
path: root/apps/dhparam.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-11-14 23:52:56 +0800
committerTomas Mraz <tomas@openssl.org>2021-11-16 17:32:45 +0100
commit84201d47b4a8f2c358f014448d89dfde5c6217fe (patch)
tree5ee5858380b6101642520eed9cee18485d618777 /apps/dhparam.c
parentee3928f23175b4e7248b8e48d46a0bbe84ebb7da (diff)
EVP_PKEY_paramgen_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/17030) (cherry picked from commit 6e0b05f3008a3f22105fd2bed9314b0bfa381f93)
Diffstat (limited to 'apps/dhparam.c')
-rw-r--r--apps/dhparam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dhparam.c b/apps/dhparam.c
index db9e964cf0..0e90698cd6 100644
--- a/apps/dhparam.c
+++ b/apps/dhparam.c
@@ -194,7 +194,7 @@ int dhparam_main(int argc, char **argv)
"Generating %s parameters, %d bit long %sprime\n",
alg, num, dsaparam ? "" : "safe ");
- if (!EVP_PKEY_paramgen_init(ctx)) {
+ if (EVP_PKEY_paramgen_init(ctx) <= 0) {
BIO_printf(bio_err,
"Error, unable to initialise %s parameters\n",
alg);