Fix for signing tool and SHA3 padding at 8-bytes.

pull/39/head
David Garske 2020-03-25 08:19:11 -07:00
parent 6af52adcb1
commit 94af71e9e9
1 changed files with 4 additions and 1 deletions

View File

@ -413,7 +413,7 @@ int main(int argc, char** argv)
&fw_version32);
/* Append Four pad bytes, so timestamp is aligned */
header_append_u32(header, &header_idx, 0xFFFFFFFF);
header_idx += 4; /* memset 0xFF above handles value */
/* Append Timestamp field */
stat(image_file, &attrib);
@ -427,6 +427,9 @@ int main(int argc, char** argv)
header_append_tag(header, &header_idx, HDR_IMG_TYPE, HDR_IMG_TYPE_LEN,
&image_type);
/* Six pad bytes, Sha-3 requires 8-byte alignment. */
header_idx += 6; /* memset 0xFF above handles value */
/* Calculate hashes */
if (hash_algo == HASH_SHA256)
{