Skip to content

Commit ac6d834

Browse files
valeriosettinashif
authored andcommitted
mbedtls: auto-select MBEDTLS_CIPHER_AES_ENABLED when built-in in PSA
Auto-select MBEDTLS_CIPHER_AES_ENABLED when AES support is requested through PSA (i.e. CONFIG_PSA_WANT_KEY_TYPE_AES) and the PSA support is provided through Mbed TLS itself (i.e. CONFIG_MBEDTLS_PSA_CRYPTO_C). This mimic what happens in Mbed TLS at build time: if AES support is required through PSA, but there's no one else providing it (i.e. no TF-M in Zephyr) then provide this support through legacy AES module. This is useful in samples/tests so that the user can simply use the PSA_WANT symbol to ask for AES support in PSA crypto and then tune the AES features (ex: CONFIG_MBEDTLS_AES_ROM_TABLES) without the need to also define CONFIG_MBEDTLS_CIPHER_AES_ENABLED. Signed-off-by: Valerio Setti <[email protected]>
1 parent 31eee15 commit ac6d834

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/mbedtls/Kconfig.tls-generic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ config MBEDTLS_SOME_CIPHER_ENABLED
246246

247247
config MBEDTLS_CIPHER_AES_ENABLED
248248
bool "AES block cipher"
249+
default y if PSA_WANT_KEY_TYPE_AES && MBEDTLS_PSA_CRYPTO_C
249250

250251
if MBEDTLS_CIPHER_AES_ENABLED
251252

0 commit comments

Comments
 (0)