1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

suit: Finalize image after digest verification

This commit is contained in:
Koen Zandberg 2020-09-26 12:28:38 +02:00
parent 791155d3dd
commit 91df9cae87
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B
2 changed files with 2 additions and 4 deletions

View File

@ -375,6 +375,7 @@ static int _dtv_verify_image_match(suit_manifest_t *manifest, int key,
if (res != 0) {
return SUIT_ERR_COND;
}
riotboot_flashwrite_finish(manifest->writer);
return SUIT_OK;
}

View File

@ -348,8 +348,8 @@ static void _suit_handle_url(const char *url)
if (size >= 0) {
LOG_INFO("suit_coap: got manifest with size %u\n", (unsigned)size);
riotboot_flashwrite_t writer;
#ifdef MODULE_SUIT
riotboot_flashwrite_t writer;
suit_manifest_t manifest;
memset(&manifest, 0, sizeof(manifest));
@ -376,9 +376,6 @@ static void _suit_handle_url(const char *url)
#endif
if (res == 0) {
LOG_INFO("suit_coap: finalizing image flash\n");
riotboot_flashwrite_finish(&writer);
const riotboot_hdr_t *hdr = riotboot_slot_get_hdr(
riotboot_slot_other());
riotboot_hdr_print(hdr);