fit: Fix verification of images with external data
PATCH 1/1 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.
--- common/image-fit-sig.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
common/image-fit-sig.c +7 -1
@@ -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;
Signature · 1 line
2.31.1
PATCH 1/1 fit: Fix verification of images with external data
Quoted 10 lines · On Tue, 20 Apr 2021 19:19:44 +0100 John Keeping <[email protected]> wrote:
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 <[email protected]>---
Any feedback on this? It would be nice to be able to verify all image types produced by mkimage!
Thanks,
John
Quoted 22 lines
common/image-fit-sig.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)common/image-fit-sig.c +7
-1@@ -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;
PATCH 1/1 fit: Fix verification of images with external data
In reply to John KeepingQuoted 5 lines · John Keeping
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.
Quoted 9 lines
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 <[email protected]>--- common/image-fit-sig.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Quoted 10 lines · John Keeping
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 <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom