Message ID | 20210128105304.401058-2-joel@jms.id.au |
---|---|
State | New |
Headers | show |
Series | Blackport SHA512 for FIT | expand |
On 1/28/2021 7:52 AM, Joel Stanley wrote: > From: Patrick Doyle <wpdster@gmail.com> > > 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. > > printf("%s:%s", algo_name, info->keyname); > > - if (!info->checksum || !info->crypto) { > + if (!info->checksum || !info->crypto || !info->padding) { Reviewed-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> > *err_msgp = "Unknown signature algorithm"; > return -1; > } >
diff --git a/common/image-sig.c b/common/image-sig.c index 4f6b4ec412c3..004fbc525b5c 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; }