summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2021-04-20 21:19:44 +0300
committerTom Rini <trini@konsulko.com>2021-08-04 22:57:13 +0300
commit8edecd3110e65ca96a50a37bf7ca65ed45070452 (patch)
treeddffde6871041ef074cdc3caf783a24cd2188f27 /common
parent66217225f7987fbfecdcc4eca3f16d0ec188dc76 (diff)
downloadu-boot-8edecd3110e65ca96a50a37bf7ca65ed45070452.tar.xz
fit: Fix verification of images with external data
The "-E" option to mkimage generates a FIT with external data using the data-size and data-offset properties which must both be ignored when verifying a signature. Add "data-offset" to the list of excluded properties for signature verification; since the line is now too long, re-format the list to one-per-line and make it static since the data is constant. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/image-fit-sig.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/image-fit-sig.c b/common/image-fit-sig.c
index 55ddf1879e..b979cd2a4b 100644
--- a/common/image-fit-sig.c
+++ b/common/image-fit-sig.c
@@ -245,7 +245,13 @@ static int fit_config_check_sig(const void *fit, int noffset,
int required_keynode, int conf_noffset,
char **err_msgp)
{
- char * const exc_prop[] = {"data", "data-size", "data-position"};
+ static char * const exc_prop[] = {
+ "data",
+ "data-size",
+ "data-position",
+ "data-offset"
+ };
+
const char *prop, *end, *name;
struct image_sign_info info;
const uint32_t *strings;