* [PATCH] fit: Fix verification of images with external data
@ 2021-04-20 18:19 John Keeping
2021-05-19 13:47 ` John Keeping
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: John Keeping @ 2021-04-20 18:19 UTC (permalink / raw)
To: u-boot
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>
---
common/image-fit-sig.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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;
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] fit: Fix verification of images with external data
2021-04-20 18:19 [PATCH] fit: Fix verification of images with external data John Keeping
@ 2021-05-19 13:47 ` John Keeping
2021-05-19 15:34 ` Simon Glass
2021-08-05 1:18 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: John Keeping @ 2021-05-19 13:47 UTC (permalink / raw)
To: u-boot
On Tue, 20 Apr 2021 19:19:44 +0100
John Keeping <john@metanate.com> 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 <john@metanate.com>
> ---
Any feedback on this? It would be nice to be able to verify all image
types produced by mkimage!
Thanks,
John
> common/image-fit-sig.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> 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;
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] fit: Fix verification of images with external data
2021-04-20 18:19 [PATCH] fit: Fix verification of images with external data John Keeping
2021-05-19 13:47 ` John Keeping
@ 2021-05-19 15:34 ` Simon Glass
2021-08-05 1:18 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2021-05-19 15:34 UTC (permalink / raw)
To: u-boot
On Tue, 20 Apr 2021 at 12:20, John Keeping <john@metanate.com> 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 <john@metanate.com>
> ---
> common/image-fit-sig.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fit: Fix verification of images with external data
2021-04-20 18:19 [PATCH] fit: Fix verification of images with external data John Keeping
2021-05-19 13:47 ` John Keeping
2021-05-19 15:34 ` Simon Glass
@ 2021-08-05 1:18 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2021-08-05 1:18 UTC (permalink / raw)
To: John Keeping; +Cc: u-boot
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
On Tue, Apr 20, 2021 at 07:19:44PM +0100, John Keeping 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 <john@metanate.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-05 1:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 18:19 [PATCH] fit: Fix verification of images with external data John Keeping
2021-05-19 13:47 ` John Keeping
2021-05-19 15:34 ` Simon Glass
2021-08-05 1:18 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.