File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -1588,7 +1588,6 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
15881588 const struct flash_area * fap ;
15891589#ifdef MCUBOOT_ENC_IMAGES
15901590 uint8_t slot ;
1591- uint8_t i ;
15921591#endif
15931592 uint32_t size ;
15941593 uint32_t copy_size ;
@@ -1676,15 +1675,10 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
16761675 boot_enc_init (BOOT_CURR_ENC_SLOT (state , slot ));
16771676
16781677 rc = boot_read_enc_key (fap , slot , bs );
1679- assert (rc == 0 );
1680-
1681- for (i = 0 ; i < BOOT_ENC_KEY_SIZE ; i ++ ) {
1682- if (bs -> enckey [slot ][i ] != 0xff ) {
1683- break ;
1684- }
1685- }
1686-
1687- if (i != BOOT_ENC_KEY_SIZE ) {
1678+ if (rc ) {
1679+ BOOT_LOG_DBG ("boot_swap_image: Failed loading key (%d, %d)" ,
1680+ image_index , slot );
1681+ } else {
16881682 boot_enc_set_key (BOOT_CURR_ENC_SLOT (state , slot ), bs -> enckey [slot ]);
16891683 }
16901684 }
You can’t perform that action at this time.
0 commit comments