aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2020-03-10 19:35:52 -0400
committerPaul Selkirk <paul@psgd.org>2020-03-10 19:35:52 -0400
commitf09f1b8f4494e90ee672e92f3357229bdfb7d0ae (patch)
tree9d0240961179188e77cb28c8eacb0f8e8ada36e4 /projects
parent38b388061364339c1259b56fe1d366de8b8630d3 (diff)
change hal_aes_use_keywrap_core
Diffstat (limited to 'projects')
-rw-r--r--projects/hsm/mgmt-misc.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/projects/hsm/mgmt-misc.c b/projects/hsm/mgmt-misc.c
index 116197d..e732484 100644
--- a/projects/hsm/mgmt-misc.c
+++ b/projects/hsm/mgmt-misc.c
@@ -249,14 +249,12 @@ static int cmd_keywrap_core(struct cli_def *cli, const char *command, char *argv
return CLI_ERROR;
}
- int ret = hal_aes_use_keywrap_core(onoff);
- if (ret)
- cli_print(cli, "keywrap core enabled");
- else if (onoff)
- cli_print(cli, "keywrap core not found");
- else
- cli_print(cli, "keywrap core disabled");
- return CLI_OK;
+ hal_error_t err;
+ if ((err = hal_aes_use_keywrap_core(onoff)) == LIBHAL_OK)
+ return CLI_OK;
+
+ cli_print(cli, hal_error_string(err));
+ return CLI_ERROR;
}
void configure_cli_misc(struct cli_def *cli)
@@ -264,7 +262,7 @@ void configure_cli_misc(struct cli_def *cli)
struct cli_command *c_keywrap = cli_register_command(cli, NULL, "keywrap", NULL, 0, 0, NULL);
/* keywrap core */
- cli_register_command(cli, c_keywrap, "core", cmd_keywrap_core, 0, 0, "Toggle use of the keywrap core");
+ cli_register_command(cli, c_keywrap, "core", cmd_keywrap_core, 0, 0, "Set use of the keywrap core");
#ifdef DO_PROFILING
struct cli_command *c_profile = cli_register_command(cli, NULL, "profile", NULL, 0, 0, NULL);