Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nrf fromtree] scripts: imgtool: fix sha512 for compression #389

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion scripts/imgtool/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,6 @@ 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
3 changes: 2 additions & 1 deletion scripts/imgtool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,8 @@ def sign(key, public_key_format, align, version, pad_sig, header_size,
compressed_img.create(key, public_key_format, enckey,
dependencies, boot_record, custom_tlvs, compression_tlvs,
compression, int(encrypt_keylen), clear, baked_signature,
pub_key, vector_to_sign)
pub_key, vector_to_sign, user_sha=user_sha,
is_pure=is_pure)
img = compressed_img
img.save(outfile, hex_addr)
if sig_out is not None:
Expand Down
Loading