Skip to content

Commit 47815c0

Browse files
committed
encrypt: check custom key fetch in aes_init
1 parent eca76ef commit 47815c0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/libwolfboot.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1788,7 +1788,9 @@ int aes_init(void)
17881788
stored_nonce = enc_key->initial_vector;
17891789
wolfCrypt_Init(); /* required to setup the crypto callback defaults */
17901790
#elif defined(CUSTOM_ENCRYPT_KEY)
1791-
wolfBoot_get_encrypt_key(key, stored_nonce);
1791+
ret = wolfBoot_get_encrypt_key(key, stored_nonce);
1792+
if (ret != 0)
1793+
goto exit;
17921794
#else
17931795
#if defined(MMU) || defined(UNIT_TEST)
17941796
key = ENCRYPT_KEY;

0 commit comments

Comments
 (0)