All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib: rsa: Add debug message on algo mismatch
@ 2021-02-16 16:40 Sean Anderson
  2021-02-16 17:01 ` Wolfgang Denk
  2021-02-25 13:29 ` Tom Rini
  0 siblings, 2 replies; 5+ messages in thread
From: Sean Anderson @ 2021-02-16 16:40 UTC (permalink / raw)
  To: u-boot

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>
---

 lib/rsa/rsa-verify.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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);
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-25 13:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-16 16:40 [PATCH] lib: rsa: Add debug message on algo mismatch Sean Anderson
2021-02-16 17:01 ` Wolfgang Denk
2021-02-16 17:05   ` Sean Anderson
2021-02-17  2:45     ` Simon Glass
2021-02-25 13:29 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.