Commit e36d3c8
boot: boot_serial: Fix mynewt build without encryption
boot_serial_encryption.c can exclude all code when
MCUBOOT_ENC_IMAGES is not defined.
However it first includes several headers that fail
to build in mynewt where MCUBOOT_ENC_IMAGES is always
undefined (so far).
This change includes configuration first and if
MCUBOOT_ENC_IMAGES is not defined it also skips
unnecessary includesion of headers and not only
actual code for encrypted images over serial.
Error that was detected:
repos/mcuboot/boot/bootutil/include/bootutil/crypto/aes_ctr.h: In function 'bootutil_aes_ctr_encrypt':
repos/mcuboot/boot/bootutil/include/bootutil/crypto/aes_ctr.h:100:12: error: implicit declaration of function 'mbedtls_aes_crypt_ctr'; did you mean 'mbedtls_aes_crypt_ecb'? [-Wimplicit-function-declaration]
100 | return mbedtls_aes_crypt_ctr(ctx, mlen, &blk_off, counter, stream_block, m, c);
| ^~~~~~~~~~~~~~~~~~~~~
| mbedtls_aes_crypt_ecb
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>1 parent da6efd1 commit e36d3c8
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments