suit: Finalize image after digest verification
This commit is contained in:
parent
791155d3dd
commit
91df9cae87
@ -375,6 +375,7 @@ static int _dtv_verify_image_match(suit_manifest_t *manifest, int key,
|
|||||||
if (res != 0) {
|
if (res != 0) {
|
||||||
return SUIT_ERR_COND;
|
return SUIT_ERR_COND;
|
||||||
}
|
}
|
||||||
|
riotboot_flashwrite_finish(manifest->writer);
|
||||||
return SUIT_OK;
|
return SUIT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -348,8 +348,8 @@ static void _suit_handle_url(const char *url)
|
|||||||
if (size >= 0) {
|
if (size >= 0) {
|
||||||
LOG_INFO("suit_coap: got manifest with size %u\n", (unsigned)size);
|
LOG_INFO("suit_coap: got manifest with size %u\n", (unsigned)size);
|
||||||
|
|
||||||
riotboot_flashwrite_t writer;
|
|
||||||
#ifdef MODULE_SUIT
|
#ifdef MODULE_SUIT
|
||||||
|
riotboot_flashwrite_t writer;
|
||||||
suit_manifest_t manifest;
|
suit_manifest_t manifest;
|
||||||
memset(&manifest, 0, sizeof(manifest));
|
memset(&manifest, 0, sizeof(manifest));
|
||||||
|
|
||||||
@ -376,9 +376,6 @@ static void _suit_handle_url(const char *url)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
LOG_INFO("suit_coap: finalizing image flash\n");
|
|
||||||
riotboot_flashwrite_finish(&writer);
|
|
||||||
|
|
||||||
const riotboot_hdr_t *hdr = riotboot_slot_get_hdr(
|
const riotboot_hdr_t *hdr = riotboot_slot_get_hdr(
|
||||||
riotboot_slot_other());
|
riotboot_slot_other());
|
||||||
riotboot_hdr_print(hdr);
|
riotboot_hdr_print(hdr);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user