summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-05-26 08:37:40 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-05-26 08:39:47 +0200
commitbd36442bbe8e58df192e642a75192241a234f9e5 (patch)
treed386f01fe1da079560de42afa418e780d5975e8b /commands
parentf2829aaca55c40010311f8fc3a1adf1dfb349c57 (diff)
downloadbarebox-bd36442bbe8e58df192e642a75192241a234f9e5.tar.gz
barebox-bd36442bbe8e58df192e642a75192241a234f9e5.tar.xz
crypto: digest: match driver name if no algo name matches
The digest command lists all registered digest implementations, but there's no way to select a specific implementation when another higher priority one exists for the same algorithm. Let's support this, by having digest_algo_get_by_name fallback to look up by driver name if an exact match couldn't be found by algo name. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230526063746.1155297-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/digest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/digest.c b/commands/digest.c
index b7ed4d50af..e57920e582 100644
--- a/commands/digest.c
+++ b/commands/digest.c
@@ -190,7 +190,7 @@ err:
BAREBOX_CMD_HELP_START(digest)
BAREBOX_CMD_HELP_TEXT("Calculate a digest over a FILE or a memory area.")
BAREBOX_CMD_HELP_TEXT("Options:")
-BAREBOX_CMD_HELP_OPT ("-a <algo>\t", "hash or signature algorithm to use")
+BAREBOX_CMD_HELP_OPT ("-a <algo>\t", "hash or signature algorithm name/driver to use")
BAREBOX_CMD_HELP_OPT ("-k <key>\t", "use supplied <key> (ASCII or hex) for MAC")
BAREBOX_CMD_HELP_OPT ("-K <file>\t", "use key from <file> (binary) for MAC")
BAREBOX_CMD_HELP_OPT ("-s <hex>\t", "verify data against supplied <hex> (hash, MAC or signature)")