Skip to content

Commit

Permalink
imgtool: create image obj with image_hash
Browse files Browse the repository at this point in the history
Kept creating the field for external usage.

Signed-off-by: Andrzej Puzdrowski <[email protected]>
  • Loading branch information
nvlsianpu committed Oct 19, 2024
1 parent bcb1965 commit df52db5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/imgtool/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,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

Expand Down

0 comments on commit df52db5

Please sign in to comment.