boot: Add missing boot_enc_init
The boot_enc_set_key in boot_swap_image, when recovering from reset, has been caled on AES context that has not been initialized. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
4da4a72cb1
commit
7e3a1cecd7
|
@ -1594,6 +1594,8 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
|
|||
}
|
||||
}
|
||||
|
||||
boot_enc_init(BOOT_CURR_ENC(state), slot);
|
||||
|
||||
if (i != BOOT_ENC_KEY_SIZE) {
|
||||
boot_enc_set_key(BOOT_CURR_ENC(state), slot, bs);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue