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:
parent
774904c910
commit
48069ff84f
@ -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);
|
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__);
|
debug("%s: Missing RSA key info", __func__);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user