@@ -44,7 +44,7 @@ if(CONFIG_BUILD_WITH_TFM OR CONFIG_PSA_SSF_CRYPTO_CLIENT)
4444
4545 # Add replacement platform.c for NS build
4646 list (APPEND src_zephyr
47- ${ZEPHYR_MBEDTLS_MODULE_DIR} /library /platform.c
47+ ${ZEPHYR_OBERON_PSA_CRYPTO_MODULE_DIR} /platform /platform.c
4848 )
4949
5050 # The current version of the mbed TLS deliverables requires mbedcrypto built
@@ -54,10 +54,7 @@ if(CONFIG_BUILD_WITH_TFM OR CONFIG_PSA_SSF_CRYPTO_CLIENT)
5454
5555 get_cmake_property (all_vars VARIABLES )
5656
57- # 1. Non-secure should not build the PSA core or drivers
58- set (CONFIG_MBEDTLS_PSA_CRYPTO_C False )
59-
60- # 2. Enable OBERON_BACKEND, disable CC3XX_BACKEND
57+ # Enable OBERON_BACKEND, disable CC3XX_BACKEND
6158 set (CONFIG_NRF_OBERON True )
6259 set (CONFIG_OBERON_BACKEND True )
6360 set (CONFIG_CC3XX_BACKEND False )
@@ -66,7 +63,7 @@ if(CONFIG_BUILD_WITH_TFM OR CONFIG_PSA_SSF_CRYPTO_CLIENT)
6663 set (CONFIG_NRF_CC3XX_PLATFORM False )
6764 set (CONFIG_PSA_CRYPTO_DRIVER_CC3XX False )
6865
69- # 3. Special case: _ALT in CC3XX, not in OBERON (set to False)
66+ # Special case: _ALT in CC3XX, not in OBERON (set to False)
7067 set (CONFIG_MBEDTLS_AES_ALT False )
7168 set (CONFIG_MBEDTLS_CCM_ALT False )
7269 set (CONFIG_MBEDTLS_CHACHAPOLY_ALT False )
@@ -76,11 +73,11 @@ if(CONFIG_BUILD_WITH_TFM OR CONFIG_PSA_SSF_CRYPTO_CLIENT)
7673 set (CONFIG_MBEDTLS_DHM_ALT False )
7774 set (CONFIG_MBEDTLS_RSA_ALT False )
7875
79- # 4. Special case: _ALT in ECJPAKE (only in OBERON, set to True)
80- # Only has effect if ECJPAKE is enabled
76+ # Special case: _ALT in ECJPAKE (only in OBERON, set to True)
77+ # Only has effect if ECJPAKE is enabled
8178 set (CONFIG_MBEDTLS_ECJPAKE_ALT True )
8279
83- # 5. Special case: Handle platform specific configurations
80+ # Special case: Handle platform specific configurations
8481 set (CONFIG_MBEDTLS_PLATFORM_EXIT_ALT False )
8582 set (CONFIG_MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT False )
8683else ()
@@ -112,14 +109,7 @@ target_compile_definitions(psa_crypto_library_config
112109# The name and intent of this comes from TF-M distribution
113110add_library (psa_interface INTERFACE )
114111
115- target_include_directories (psa_interface
116- INTERFACE
117- ${ZEPHYR_OBERON_PSA_CRYPTO_MODULE_DIR} /include
118- ${ZEPHYR_OBERON_PSA_CRYPTO_MODULE_DIR} /library
119- ${ZEPHYR_OBERON_PSA_CRYPTO_MODULE_DIR} /core/
120- ${ZEPHYR_OBERON_PSA_CRYPTO_MODULE_DIR} /dispatch/
121- ${ZEPHYR_OBERON_PSA_CRYPTO_MODULE_DIR} /platform/
122- )
112+ include (cmake/psa_interface_shared_properties.cmake )
123113
124114# Finally adding the crypto lib
125115add_subdirectory (${ZEPHYR_NRFXLIB_MODULE_DIR} /crypto crypto_copy )
0 commit comments