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

Better than crashing later if it is missing.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka 2020-05-07 20:36:13 +02:00 committed by Tom Rini
parent 774904c910
commit 48069ff84f

View File

@ -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;
}