Skip to content

Commit

Permalink
[nrf fromlist] 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 <andrzej.puzdrowski@nordicsemi.no>
  • Loading branch information
nvlsianpu committed Oct 19, 2024
1 parent 07ee100 commit bd5f791
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 @@ -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

Expand Down

0 comments on commit bd5f791

Please sign in to comment.