Skip to content

Commit 08ebfa2

Browse files
frkvrlubos
authored andcommitted
nrf_security: Adding more accurate _ALT scheme for nrf_oberon
-Ensured that _ALT flags only applicable to nrf_oberon is only set when ONLY oberon is set (depends on OBERON_ONLY_ENABLED -Ensured that config OBERON_ONLY_PSA_ENABLED also consider CC3XX_BACKEND -Using the OBERON_ONLY_ENABLED mask to take files in for legacy build ref: NCSDK-13783 Signed-off-by: Frank Audun Kvamtrø <[email protected]>
1 parent 628d01d commit 08ebfa2

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

nrf_security/Kconfig.legacy

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,22 @@ config MBEDTLS_PLATFORM_ZEROIZE_ALT
5656
# Legacy configurations for _ALT defines
5757
config MBEDTLS_AES_SETKEY_ENC_ALT
5858
bool
59-
depends on OBERON_BACKEND || PSA_CRYPTO_DRIVER_OBERON
59+
depends on OBERON_ONLY_ENABLED
6060
default y
6161

6262
config MBEDTLS_AES_SETKEY_DEC_ALT
6363
bool
64-
depends on OBERON_BACKEND || PSA_CRYPTO_DRIVER_OBERON
64+
depends on OBERON_ONLY_ENABLED
6565
default y
6666

6767
config MBEDTLS_AES_ENCRYPT_ALT
6868
bool
69-
depends on OBERON_BACKEND || PSA_CRYPTO_DRIVER_OBERON
69+
depends on OBERON_ONLY_ENABLED
7070
default y
7171

7272
config MBEDTLS_AES_DECRYPT_ALT
7373
bool
74-
depends on OBERON_BACKEND || PSA_CRYPTO_DRIVER_OBERON
74+
depends on OBERON_ONLY_ENABLED
7575
default y
7676

7777
config MBEDTLS_AES_ALT
@@ -154,7 +154,7 @@ config MBEDTLS_ECDSA_VERIFY_ALT
154154

155155
config MBEDTLS_ECJPAKE_ALT
156156
bool
157-
depends on OBERON_BACKEND || PSA_CRYPTO_DRIVER_OBERON
157+
depends on OBERON_ONLY_ENABLED
158158
default y
159159

160160
config MBEDTLS_RSA_ALT
@@ -243,7 +243,8 @@ config CC312_ONLY_ENABLED
243243
config OBERON_ONLY_PSA_ENABLED
244244
bool
245245
default y
246-
depends on (PSA_CRYPTO_DRIVER_OBERON && !PSA_CRYPTO_DRIVER_CC3XX)
246+
depends on (PSA_CRYPTO_DRIVER_OBERON && !PSA_CRYPTO_DRIVER_CC3XX) && \
247+
!CC3XX_BACKEND
247248

248249
config OBERON_ONLY_ENABLED
249250
bool

nrf_security/src/legacy/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ if(NOT CONFIG_OBERON_BACKEND)
8585
endif()
8686

8787
# Add oberon-specific replacement files
88-
if (CONFIG_OBERON_BACKEND OR PSA_CRYPTO_DRIVER_OBERON)
88+
if (CONFIG_OBERON_ONLY_ENABLED)
8989
list(APPEND src_crypto_legacy
9090
${CMAKE_CURRENT_LIST_DIR}/aes.c
9191
${CMAKE_CURRENT_LIST_DIR}/aes_oberon.c

0 commit comments

Comments
 (0)