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>
(cherry picked from commit 7e3a1cecd7
)
This commit is contained in:
parent
071b3b8e0f
commit
f2971d2014
|
@ -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