Re: [PATCH] lib: rsa: Also check for presence of r-squared property

2020-05-15 Thread Tom Rini
On Thu, May 07, 2020 at 08:36:13PM +0200, Jan Kiszka wrote:

> From: Jan Kiszka 
> 
> Better than crashing later if it is missing.
> 
> Signed-off-by: Jan Kiszka 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: PGP signature


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

2020-05-07 Thread Jan Kiszka
From: Jan Kiszka 

Better than crashing later if it is missing.

Signed-off-by: Jan Kiszka 
---
 lib/rsa/rsa-verify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index 80e817314b..f7ae174cb0 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -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;
}
-- 
2.26.1