mirror of
https://github.com/openssl/openssl.git
synced 2025-03-01 19:28:10 +08:00
Fix the checks of EVP_PKEY_param_check
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/18424)
This commit is contained in:
parent
5755c11fd6
commit
e85bef981c
@ -329,7 +329,7 @@ int dhparam_main(int argc, char **argv)
|
||||
BIO_printf(bio_err, "Error, failed to check DH parameters\n");
|
||||
goto end;
|
||||
}
|
||||
if (!EVP_PKEY_param_check(ctx)) {
|
||||
if (EVP_PKEY_param_check(ctx) <= 0) {
|
||||
BIO_printf(bio_err, "Error, invalid parameters generated\n");
|
||||
goto end;
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ int ecparam_main(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
pctx = EVP_PKEY_CTX_new_from_pkey(NULL, params_key, NULL);
|
||||
if (pctx == NULL || !EVP_PKEY_param_check(pctx)) {
|
||||
if (pctx == NULL || EVP_PKEY_param_check(pctx) <= 0) {
|
||||
BIO_printf(bio_err, "failed\n");
|
||||
goto end;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user