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 @@ -1105,7 +1105,6 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
11051105 const struct flash_area * fap ;
11061106#ifdef MCUBOOT_ENC_IMAGES
11071107 uint8_t slot ;
1108- uint8_t i ;
11091108#endif
11101109 uint32_t size ;
11111110 uint32_t copy_size ;
@@ -1193,15 +1192,10 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
11931192 boot_enc_init (BOOT_CURR_ENC_SLOT (state , slot ));
11941193
11951194 rc = boot_read_enc_key (fap , slot , bs );
1196- assert (rc == 0 );
1197-
1198- for (i = 0 ; i < BOOT_ENC_KEY_SIZE ; i ++ ) {
1199- if (bs -> enckey [slot ][i ] != 0xff ) {
1200- break ;
1201- }
1202- }
1203-
1204- if (i != BOOT_ENC_KEY_SIZE ) {
1195+ if (rc ) {
1196+ BOOT_LOG_DBG ("boot_swap_image: Failed loading key (%d, %d)" ,
1197+ image_index , slot );
1198+ } else {
12051199 boot_enc_set_key (BOOT_CURR_ENC_SLOT (state , slot ), bs -> enckey [slot ]);
12061200 }
12071201 }
You can’t perform that action at this time.
0 commit comments