Skip to content

Commit 72a8bdc

Browse files
de-nordicnvlsianpu
authored andcommitted
[nrf noup] zephyr: sdk-nrf specific overrides on PSA Kconfigs
Select proper configuration and disable mbedTLS selection, as we are using NRF Security enabled Oberon. Signed-off-by: Dominik Ermel <[email protected]>
1 parent f203bf1 commit 72a8bdc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

boot/bootutil/zephyr/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if(CONFIG_BOOT_USE_PSA_CRYPTO)
4040
)
4141
endif()
4242

43-
if(CONFIG_BOOT_USE_MBEDTLS OR CONFIG_BOOT_USE_PSA_CRYPTO)
43+
if(CONFIG_BOOT_USE_MBEDTLS OR CONFIG_BOOT_USE_PSA_CRYPTO AND NOT CONFIG_NRF_SECURITY)
4444
zephyr_link_libraries(mbedTLS)
4545
endif()
4646
endif()

boot/zephyr/Kconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ config BOOT_ED25519_PSA_DEPENDENCIES
8989
select PSA_WANT_ALG_SHA_256
9090
select PSA_WANT_ALG_SHA_512
9191
select PSA_WANT_ALG_PURE_EDDSA
92-
# Seems that upstream mbedTLS does not have TE
93-
#select PSA_WANT_ECC_TWISTED_EDWARDS_255
92+
select PSA_WANT_ECC_TWISTED_EDWARDS_255
9493
select PSA_WANT_ECC_MONTGOMERY_255
9594
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
9695
help
@@ -285,6 +284,7 @@ config BOOT_SIGNATURE_TYPE_PURE
285284

286285
choice BOOT_ED25519_IMPLEMENTATION
287286
prompt "Ecdsa implementation"
287+
default BOOT_ED25519_PSA if NRF_SECURITY
288288
default BOOT_ED25519_TINYCRYPT
289289

290290
config BOOT_ED25519_TINYCRYPT
@@ -305,7 +305,7 @@ config BOOT_ED25519_MBEDTLS
305305

306306
config BOOT_ED25519_PSA
307307
bool "Use PSA crypto"
308-
select MBEDTLS
308+
depends on NRF_SECURITY
309309
select BOOT_USE_PSA_CRYPTO
310310
select PSA_CRYPTO_CLIENT
311311
select PSA_CRYPTO_C
@@ -370,11 +370,11 @@ config MCUBOOT_CLEANUP_RAM
370370
help
371371
Sets contents of memory to 0 before jumping to application.
372372

373-
if MBEDTLS
373+
if MBEDTLS || NRF_SECURITY
374374

375375
config MBEDTLS_CFG_FILE
376376
default "config-tls-generic.h" if MBEDTLS_BUILTIN || BOOT_USE_PSA_CRYPTO
377-
default "mcuboot-mbedtls-cfg.h" if BOOT_USE_MBEDTLS
377+
default "mcuboot-mbedtls-cfg.h" if BOOT_USE_MBEDTLS && !NRF_SECURITY
378378

379379
endif
380380

0 commit comments

Comments
 (0)