We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 497688b commit 028d80cCopy full SHA for 028d80c
boot/bootutil/src/loader.c
@@ -1723,6 +1723,9 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
1723
1724
#ifdef MCUBOOT_ENC_IMAGES
1725
for (slot = 0; slot < BOOT_NUM_SLOTS; slot++) {
1726
+
1727
+ boot_enc_init(BOOT_CURR_ENC(state), slot);
1728
1729
rc = boot_read_enc_key(fap, slot, bs);
1730
assert(rc == 0);
1731
@@ -1732,8 +1735,6 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
1732
1735
}
1733
1736
1734
1737
- boot_enc_init(BOOT_CURR_ENC(state), slot);
-
1738
if (i != BOOT_ENC_KEY_SIZE) {
1739
boot_enc_set_key(BOOT_CURR_ENC(state), slot, bs);
1740
0 commit comments