Skip to contentSkip to conversation

lib: rsa: Also check for presence of r-squared property

PATCH New Jan Kiszka 2 participants 2 messages May 7, 2020 – May 15, 2020

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 lib: rsa: Also check for presence of r-squared property

From: Jan Kiszka <[email protected]>

Better than crashing later if it is missing.

---
 lib/rsa/rsa-verify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/rsa/rsa-verify.c +1 -1
index 80e817314b..f7ae174cb0 100644
@@ -445,7 +445,7 @@ static int rsa_verify_with_keynode(struct image_sign_info *info,
 
 	prop.rr = fdt_getprop(blob, node, "rsa,r-squared", NULL);
 
-	if (!prop.num_bits || !prop.modulus) {
+	if (!prop.num_bits || !prop.modulus || !prop.rr) {
 		debug("%s: Missing RSA key info", __func__);
 		return -EFAULT;
 	}
Signature · 1 line
2.26.1
#1 lore raw

PATCH 1/1 lib: rsa: Also check for presence of r-squared property

Quoted 5 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

Better than crashing later if it is missing.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200515/73f57247/attachment.sig>