Browse Source

Fix cryptotools.py signature alignment

If the signature start address is already aligned, the tool erroneously adds 4 filling bytes

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
release/1.12
Jukka Laitinen 4 years ago committed by Beat Küng
parent
commit
caed8e4b05
  1. 1
      Tools/cryptotools.py

1
Tools/cryptotools.py

@ -81,6 +81,7 @@ def sign(bin_file_path, key_file_path=None, generated_key_file=None): @@ -81,6 +81,7 @@ def sign(bin_file_path, key_file_path=None, generated_key_file=None):
# Align to 4 bytes. Signature always starts at
# 4 byte aligned address, but the signee size
# might not be aligned
if len(signee_bin)%4 != 0:
signee_bin += bytearray(b'\xff')*(4-len(signee_bin)%4)
try:

Loading…
Cancel
Save