Skip to content

Commit

Permalink
openthread: fix whitelists for prebuild libraries
Browse files Browse the repository at this point in the history
update TFM whitelist and add CC3XX whitelist for crypto checks
when building with prebuilt libs

Signed-off-by: Maciej Baczmanski <[email protected]>
  • Loading branch information
maciejbaczmanski committed Nov 6, 2024
1 parent b3c53cf commit 865c246
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions openthread/cmake/crypto_config_cc3xx_whitelist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CONFIG_MBEDTLS_AES_DECRYPT_ALT
CONFIG_MBEDTLS_AES_ENCRYPT_ALT
CONFIG_MBEDTLS_AES_SETKEY_DEC_ALT
CONFIG_MBEDTLS_AES_SETKEY_ENC_ALT
CONFIG_MBEDTLS_ECJPAKE_ALT
1 change: 1 addition & 0 deletions openthread/cmake/crypto_config_tfm_whitelist.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
CONFIG_MBEDTLS_ENTROPY_POLL
CONFIG_MBEDTLS_ENABLE_HEAP
4 changes: 3 additions & 1 deletion openthread/cmake/extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,15 @@ function(check_openthread_dependencies CONFIG_FILE)
get_cmake_property(_variableNames VARIABLES)
file(READ ${CONFIG_FILE} FILE_CONTENT)
file(READ "cmake/crypto_config_tfm_whitelist.txt" TFM_WHITELIST)
file(READ "cmake/crypto_config_cc3xx_whitelist.txt" CC3XX_WHITELIST)
string(REGEX MATCHALL "CONFIG_(MBEDTLS_|PSA_WANT_)[^\n]*" match_list ${FILE_CONTENT})
foreach(element ${match_list})
string(REGEX MATCH "([^=]+)=(.*)" _ ${element})
set(config_name "${CMAKE_MATCH_1}")
set(config_value "${CMAKE_MATCH_2}")
if (NOT ((config_name IN_LIST _variableNames AND ${${config_name}} STREQUAL ${config_value}) OR
(CONFIG_BUILD_WITH_TFM AND ${TFM_WHITELIST} MATCHES ${config_name})))
(CONFIG_BUILD_WITH_TFM AND ${TFM_WHITELIST} MATCHES ${config_name}) OR
(CONFIG_PSA_CRYPTO_DRIVER_CC3XX AND ${CC3XX_WHITELIST} MATCHES ${config_name})))
message(WARNING
" \n"
" ${config_name}=${config_value} is required by the precompiled OpenThread libraries,"
Expand Down

0 comments on commit 865c246

Please sign in to comment.