From d46b6785c4bcd3ceb7d90895e9f44a7bf7d6757d Mon Sep 17 00:00:00 2001 From: Philippe Leduc Date: Fri, 3 Jul 2015 08:47:26 +0200 Subject: digest: digest doesn't return an error if the signature length is incorrect fix: digest return no error even if the digest length is wrong fix: documentation error (-v -> -s / -V -> -S) Signed-off-by: Philippe Leduc Signed-off-by: Sascha Hauer --- commands/digest.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/digest.c b/commands/digest.c index 4cc615d775..02a9f6f0de 100644 --- a/commands/digest.c +++ b/commands/digest.c @@ -167,6 +167,7 @@ static int do_digest(int argc, char *argv[]) } else if (siglen != digestlen) { eprintf("%s wrong size %zu, expected %zu\n", sigfile, siglen, digestlen); + ret = COMMAND_ERROR; goto err; } } @@ -186,8 +187,8 @@ BAREBOX_CMD_HELP_TEXT("Options:") BAREBOX_CMD_HELP_OPT ("-a \t", "hash or signature algorithm to use") BAREBOX_CMD_HELP_OPT ("-k \t", "use supplied (ASCII or hex) for MAC") BAREBOX_CMD_HELP_OPT ("-K \t", "use key from (binary) for MAC") -BAREBOX_CMD_HELP_OPT ("-v \t", "verify data against supplied (hash, MAC or signature)") -BAREBOX_CMD_HELP_OPT ("-V \t", "verify data against (hash, MAC or signature)") +BAREBOX_CMD_HELP_OPT ("-s \t", "verify data against supplied (hash, MAC or signature)") +BAREBOX_CMD_HELP_OPT ("-S \t", "verify data against (hash, MAC or signature)") BAREBOX_CMD_HELP_END BAREBOX_CMD_START(digest) -- cgit v1.2.3