From bd5f7917153986ac678e73d5fa717707cde32c81 Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Sat, 19 Oct 2024 15:21:23 +0200 Subject: [PATCH] [nrf fromlist] imgtool: create image obj with image_hash Kept creating the field for external usage. Signed-off-by: Andrzej Puzdrowski --- scripts/imgtool/image.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/imgtool/image.py b/scripts/imgtool/image.py index 5e10ab78a..d05120548 100644 --- a/scripts/imgtool/image.py +++ b/scripts/imgtool/image.py @@ -604,6 +604,8 @@ def create(self, key, public_key_format, enckey, dependencies=None, sha.update(self.payload) digest = sha.digest() tlv.add(hash_tlv, digest) + # for external usage + self.image_hash = digest # Unless pure, we are signing digest. message = digest