summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-11-27 20:45:21 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-02-04 07:25:14 +0100
commit03da39a768467a4ce493502f20503079853282a3 (patch)
treed7a64cc88895732ca6170925d3a15e98819b3c3c /apps
parentacfccbd5ee09e453ac5e8f39744540907b0cac2b (diff)
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)
Diffstat (limited to 'apps')
-rw-r--r--apps/cmp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/cmp.c b/apps/cmp.c
index 66c4b702d6..1dbd1f7339 100644
--- a/apps/cmp.c
+++ b/apps/cmp.c
@@ -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) {