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

Conversation

joerchan
Copy link
Contributor

Fix the kconfig_check_and_set_base_to_val_depends extension macro
creating an inconsistent configuration.
This macro sets the base name to, but not the kconfig name.
For example:
'kconfig_check_and_set_base_to_val_depends(MBEDTLS_EXAMPLE_ALG,
PSA_WANT_EXAMPLE_ALG)' can create this inconsistentency:
CONFIG_PSA_WANT_EXAMPLE_ALG: true
MBEDTLS_EXAMPLE_ALG: true
CONFIG_MBEDTLS_EXAMPLE_ALG: false

This means that the macro cannot be used to check a series of chained
dependencies.

Make sure that the macro modifies the value of both the base and the
kconfig variable.

Re-order legacy cmake configuration force-enabling.
This fixes the issue where PSA_WANT_ALG_SHA_256 enables MBEDTLS_SHA256
without enabling MBEDTLS_SHA224.
This could otherwise lead to an error in check_config.h

Fix the kconfig_check_and_set_base_to_val_depends extension macro
creating an inconsistent configuration.
This macro sets the base name to, but not the kconfig name.
For example:
'kconfig_check_and_set_base_to_val_depends(MBEDTLS_EXAMPLE_ALG,
PSA_WANT_EXAMPLE_ALG)' can create this inconsistentency:
CONFIG_PSA_WANT_EXAMPLE_ALG: true
MBEDTLS_EXAMPLE_ALG: true
CONFIG_MBEDTLS_EXAMPLE_ALG: false

This means that the macro cannot be used to check a series of chained
dependencies.

Make sure that the macro modifies the value of both the base and the
kconfig variable.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Re-order legacy cmake configuration force-enabling.
This fixes the issue where PSA_WANT_ALG_SHA_256 enables MBEDTLS_SHA256
without enabling MBEDTLS_SHA224.
This could otherwise lead to an error in check_config.h

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jun 22, 2023
@joerchan joerchan changed the title Psa default off legacy force sha nrf_security: Fix Legacy configuration for enabling SHA algorithms Jun 22, 2023
@NordicBuilder
Copy link
Contributor

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-fw-nrfconnect-chip X
test-fw-nrfconnect-nrf-iot_cloud X
test-fw-nrfconnect-nrf-iot_zephyr_lwm2m X
test-fw-nrfconnect-nrf_crypto X
test-fw-nrfconnect-tfm X
test-sdk-find-my X
test-sdk-homekit X
test-sdk-wifi X
test-sdk-wifi-EK-shell X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

@carlescufi carlescufi merged commit 5ec0e3a into nrfconnect:main Jun 23, 2023
18 of 20 checks passed
@joerchan joerchan deleted the psa-default-off-legacy-force-sha branch June 23, 2023 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants