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

nrf_security: Fix Legacy configuration for enabling SHA algorithms #11602

Merged
merged 2 commits into from
Jun 23, 2023
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
1 change: 1 addition & 0 deletions subsys/nrf_security/cmake/extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ macro(kconfig_check_and_set_base_to_val_depends base val)
if(_argn_all_true)
nrf_security_debug("Setting ${base} to True because all depends are set")
set(${base} ${val})
set(CONFIG_${base} ${val})
else()
nrf_security_debug("Not setting ${base} because ${_argn_false_arg} is not set")
endif()
Expand Down
10 changes: 5 additions & 5 deletions subsys/nrf_security/cmake/legacy_crypto_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,6 @@ if (CONFIG_CC3XX_BACKEND)
endif()
endif()

# Ensure that MBEDTLS_SHA224_C is set if MBEDTLS_SHA256_C
# to prevent build errors.
kconfig_check_and_set_base_depends(MBEDTLS_SHA224_C
MBEDTLS_SHA256_C
)

# Convert defines required even in PSA mode
kconfig_check_and_set_base_depends(MBEDTLS_SHA1_C
Expand Down Expand Up @@ -281,6 +276,11 @@ Kconfig_check_and_set_base_depends(MBEDTLS_ECP_DP_CURVE448_ENABLED
PSA_WANT_ECC_MONTGOMERY_448
)

# Ensure that MBEDTLS_SHA224_C is set if MBEDTLS_SHA256_C
# to prevent build errors.
kconfig_check_and_set_base_depends(MBEDTLS_SHA224_C
MBEDTLS_SHA256_C
)

if(CONFIG_GENERATE_MBEDTLS_CFG_FILE)
# Generate the mbed TLS config file (default nrf-config.h)
Expand Down