Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport v2.8-branch] openthread: fix whitelists for prebuild libraries #1562

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading