From: Jan Kiszka Date: Thu, 7 May 2020 18:36:13 +0000 (+0200) Subject: lib: rsa: Also check for presence of r-squared property X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=48069ff84fe5e5e0ad733bef4718e02600b518c4;p=u-boot.git lib: rsa: Also check for presence of r-squared property Better than crashing later if it is missing. Signed-off-by: Jan Kiszka --- 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; }