diff options
author | Peiwei Hu <jlu.hpw@foxmail.com> | 2022-05-24 17:57:33 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-06-02 11:06:41 +0200 |
commit | 2cba2e160d5b028e4a777e8038744a8bc4280629 (patch) | |
tree | 806dd88d75132a8b1b91c29c171f600885a75efe /apps/dhparam.c | |
parent | Fix the check of evp_pkey_ctx_set_params_strict (diff) | |
download | openssl-2cba2e160d5b028e4a777e8038744a8bc4280629.tar.xz openssl-2cba2e160d5b028e4a777e8038744a8bc4280629.zip |
Fix the checks of EVP_PKEY_CTX_set/get_* functions
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18399)
Diffstat (limited to 'apps/dhparam.c')
-rw-r--r-- | apps/dhparam.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/dhparam.c b/apps/dhparam.c index b9ce418c61..764f7929d4 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -217,16 +217,16 @@ int dhparam_main(int argc, char **argv) } if (dsaparam) { - if (!EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, num)) { + if (EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, num) <= 0) { BIO_printf(bio_err, "Error, unable to set DSA prime length\n"); goto end; } } else { - if (!EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, num)) { + if (EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, num) <= 0) { BIO_printf(bio_err, "Error, unable to set DH prime length\n"); goto end; } - if (!EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, g)) { + if (EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, g) <= 0) { BIO_printf(bio_err, "Error, unable to set generator\n"); goto end; } |