Skip to content

Commit

Permalink
fixup! sys/suit: add SUIT draft v4 firmware upgrade module
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 committed Jul 12, 2019
1 parent 2815d9f commit 80256bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sys/suit/v4/handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,11 @@ static int _dtv_fetch(suit_v4_manifest_t *manifest, int key, CborValue *_it)
return res;
}

res = riotboot_flashwrite_verify_sha256(digest, manifest->components[0].size, target_slot);
/* "digest" points to a 36 byte string that includes the digest type.
* riotboot_flashwrite_verify_sha256() is only interested in the 32b digest,
* so shift the pointer accordingly.
*/
res = riotboot_flashwrite_verify_sha256(digest + 4, manifest->components[0].size, target_slot);
if (res) {
LOG_INFO("image verification failed\n");
return res;
Expand Down

0 comments on commit 80256bf

Please sign in to comment.