summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPatrick Doyle <wpdster@gmail.com>2019-06-14 13:43:38 -0400
committerTom Rini <trini@konsulko.com>2019-06-21 10:07:11 -0400
commit19495dd9b6f5f4e893b56b0c73e14b2e671c3780 (patch)
treed61a57c7b2faaae041ec3396d56bd90eb6be444f /common
parent226a35ef0ef310d8fffa3e6283ee3aab9dab26aa (diff)
rsa: reject images with unknown padding
Previously we would store NULL in info->padding and jump to an illegal instruction if an unknown value for "padding" was specified in the device tree. Signed-off-by: Patrick Doyle <pdoyle@irobot.com>
Diffstat (limited to 'common')
-rw-r--r--common/image-sig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/image-sig.c b/common/image-sig.c
index 4f6b4ec412..004fbc525b 100644
--- a/common/image-sig.c
+++ b/common/image-sig.c
@@ -211,7 +211,7 @@ static int fit_image_setup_verify(struct image_sign_info *info,
info->required_keynode = required_keynode;
printf("%s:%s", algo_name, info->keyname);
- if (!info->checksum || !info->crypto) {
+ if (!info->checksum || !info->crypto || !info->padding) {
*err_msgp = "Unknown signature algorithm";
return -1;
}