diff options
author | Jan Kiszka | 2020-05-07 20:36:13 +0200 |
---|---|---|
committer | Tom Rini | 2020-05-15 14:47:35 -0400 |
commit | 48069ff84fe5e5e0ad733bef4718e02600b518c4 (patch) | |
tree | 74794e034e5c4338982bf2de3a06f7112e08bd37 /lib/rsa | |
parent | 774904c910ce9b8b1be82c784ae5163e622ca1c6 (diff) |
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>
Diffstat (limited to 'lib/rsa')
-rw-r--r-- | lib/rsa/rsa-verify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index 80e817314b5..f7ae174cb05 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; } |