diff options
author | Sean Anderson <sean.anderson@seco.com> | 2021-02-16 11:40:15 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-02-24 16:51:48 -0500 |
commit | 8f684bc12034721585f6412e39155898c8db3d65 (patch) | |
tree | a89e111a72dd50a5f4f428db06b88e79efe54e26 /lib/rsa | |
parent | 9abe5e68033dab0d521475090ffd0cef9cb2c581 (diff) | |
download | u-boot-8f684bc12034721585f6412e39155898c8db3d65.tar.gz |
lib: rsa: Add debug message on algo mismatch
Currently we fail silently if there is an algorithm mismatch. To help
distinguish this failure condition.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Diffstat (limited to 'lib/rsa')
-rw-r--r-- | lib/rsa/rsa-verify.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index e34d3293d1..aee76f42d5 100644 --- a/lib/rsa/rsa-verify.c +++ b/lib/rsa/rsa-verify.c @@ -447,8 +447,11 @@ static int rsa_verify_with_keynode(struct image_sign_info *info, } algo = fdt_getprop(blob, node, "algo", NULL); - if (strcmp(info->name, algo)) + if (strcmp(info->name, algo)) { + debug("%s: Wrong algo: have %s, expected %s", __func__, + info->name, algo); return -EFAULT; + } prop.num_bits = fdtdec_get_int(blob, node, "rsa,num-bits", 0); |