From: Sean Anderson Date: Tue, 16 Feb 2021 16:40:15 +0000 (-0500) Subject: lib: rsa: Add debug message on algo mismatch X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/git-logo.png?a=commitdiff_plain;h=8f684bc12034721585f6412e39155898c8db3d65;p=u-boot.git 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 --- 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);