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>
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index 80e8173..f7ae174 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -445,7 +445,7 @@
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;
}