apps/cmp.c: check and exit on engine load error

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13551)
This commit is contained in:
Dr. David von Oheimb 2020-11-27 20:45:21 +01:00 committed by Dr. David von Oheimb
parent acfccbd5ee
commit 03da39a768
1 changed files with 6 additions and 1 deletions

View File

@ -2716,8 +2716,13 @@ int cmp_main(int argc, char **argv)
if (opt_batch)
set_base_ui_method(UI_null());
if (opt_engine != NULL)
if (opt_engine != NULL) {
engine = setup_engine_methods(opt_engine, 0 /* not: ENGINE_METHOD_ALL */, 0);
if (engine == NULL) {
CMP_err1("cannot load engine %s", opt_engine);
goto err;
}
}
if (opt_port != NULL) {
if (opt_use_mock_srv) {