mirror of
https://github.com/openssl/openssl.git
synced 2025-04-24 20:51:14 +08:00
apps/ecparam: Avoid crash when parameters fail to load
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14043)
This commit is contained in:
parent
963a65bfb4
commit
28e1904250
@ -238,7 +238,7 @@ int ecparam_main(int argc, char **argv)
|
||||
}
|
||||
} else {
|
||||
params_key = load_keyparams(infile, 1, "EC", "EC parameters");
|
||||
if (!EVP_PKEY_is_a(params_key, "EC"))
|
||||
if (params_key == NULL || !EVP_PKEY_is_a(params_key, "EC"))
|
||||
goto end;
|
||||
if (point_format
|
||||
&& !EVP_PKEY_set_utf8_string_param(
|
||||
|
Loading…
x
Reference in New Issue
Block a user