Skip to content

nrf_security: fix undefined Kconfig option references #23168

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion doc/_utils/redirects.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""
Copyright (c) 2022 Nordic Semiconductor
SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -553,7 +553,8 @@
("libraries/nrf_security/doc/configuration", "libraries/security/nrf_security/doc/configuration"), # Configuration
("libraries/nrf_security/doc/driver_config", "security/crypto/driver_config"), # Feature configurations and driver support (moved to security/crypto for v3.1.0)
("libraries/security/nrf_security/doc/driver_config", "security/crypto/driver_config"),
("libraries/nrf_security/doc/mbed_tls_header", "libraries/security/nrf_security/doc/mbed_tls_header"), # User-provided Mbed TLS configuration header
("libraries/nrf_security/doc/mbed_tls_header", "libraries/security/nrf_security/index"), # User-provided Mbed TLS configuration header (removed in v3.1.0)
("libraries/security/nrf_security/doc/mbed_tls_header", "libraries/security/nrf_security/index"), # User-provided Mbed TLS configuration header (removed in v3.1.0)
("libraries/nrf_security/doc/backend_config", "libraries/security/nrf_security/doc/backend_config"), # Legacy configurations and supported features
("libraries/tfm/index", "libraries/security/tfm/index"), # TF-M libraries (landing)
("libraries/tfm/tfm_ioctl_api", "libraries/security/tfm/tfm_ioctl_api"), # TF-M input/output control (IOCTL)
Expand Down
1 change: 0 additions & 1 deletion doc/nrf/app_dev/device_guides/nrf53/logging_nrf5340.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ There are several options to get UART output from the secure TF-M:
* Disable the output for the network core and change the pins used by TF-M.
The network core usually has a child image.
To configure logging in an |NCS| image, see :ref:`ug_logging`.
To change the pins used by TF-M, set the RXD (:kconfig:option:`CONFIG_TFM_UART1_RXD_PIN`) and TXD (:kconfig:option:`CONFIG_TFM_UART1_TXD_PIN`) Kconfig options in the application image to **P1.00** (32) and **P1.01** (33).

* You can wire the secure and non-secure UART peripherals to the same pins.
Specifically, physically wire together the pins **P0.25** and **P0.26** to **P0.20** and **P0.22**, respectively.
Expand Down
30 changes: 0 additions & 30 deletions doc/nrf/libraries/security/nrf_security/doc/mbed_tls_header.rst

This file was deleted.

3 changes: 1 addition & 2 deletions doc/nrf/libraries/security/nrf_security/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The nRF Security subsystem provides:
* Software fallbacks when hardware acceleration is unavailable (``nrf_oberon``)
* A PSA driver abstraction layer enabling simultaneous use of hardware and software implementations
* Compatibility with the specific Mbed TLS version included in the |NCS| through `sdk-mbedtls`_
* Integration logic for the PSA Oberon core (`sdk-oberon-psa-crypto`_)
* Integration logic for the Oberon PSA Crypto core (`sdk-oberon-psa-crypto`_)
* Source code for the CRACEN driver used for the :ref:`ug_nrf54l_cryptography`
* Integration with the |NCS| build system

Expand All @@ -26,4 +26,3 @@ This library conforms to the specific revision of Mbed TLS that is supplied thro

doc/configuration
doc/backend_config
doc/mbed_tls_header
2 changes: 1 addition & 1 deletion doc/nrf/security/tfm/tfm_building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ TF-M's Secure Partition Manager (SPM) backend may also be configured, depending
- With IPC, each Secure Partition processes signals in any order, and can defer responding to a message while continuing to process other signals.
- Levels 1, 2 and 3

To control the number of logging messages, set the :kconfig:option:`CONFIG_TFM_LOG_LEVEL` Kconfig option.
To control the number of logging messages, set the :kconfig:option:`CONFIG_TFM_SPM_LOG_LEVEL` Kconfig option.
To disable logging, set the :kconfig:option:`CONFIG_TFM_LOG_LEVEL_SILENCE` option.

The size of TF-M partitions is affected by multiple configuration options and hardware-related options.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static enum tfm_plat_err_t tfm_plat_get_huk(uint8_t *buf, size_t buf_len, size_t

return TFM_PLAT_ERR_SUCCESS;
}
#endif /* CONFIG_HW_UNQUE_KEY */
#endif /* CONFIG_HW_UNIQUE_KEY */

#ifdef TFM_PARTITION_INITIAL_ATTESTATION
static enum tfm_plat_err_t tfm_plat_get_iak(uint8_t *buf, size_t buf_len, size_t *key_len,
Expand Down
2 changes: 1 addition & 1 deletion samples/bootloader/socs/nrf54l05_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CONFIG_PSA_USE_CRACEN_MAC_DRIVER=n
# Hardware support for ED25519
CONFIG_PSA_USE_CRACEN_HASH_DRIVER=y
CONFIG_PSA_USE_CRACEN_CIPHER_DRIVER=y
CONFIG_PSA_USE_CRACEN_ASYMMETRIC_DRIVER=y
CONFIG_PSA_USE_CRACEN_ASYMMETRIC_SIGNATURE_DRIVER=y

# Link Time Optimizations
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
Expand Down
2 changes: 1 addition & 1 deletion samples/bootloader/socs/nrf54l10_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CONFIG_PSA_USE_CRACEN_MAC_DRIVER=n
# Hardware support for ED25519
CONFIG_PSA_USE_CRACEN_HASH_DRIVER=y
CONFIG_PSA_USE_CRACEN_CIPHER_DRIVER=y
CONFIG_PSA_USE_CRACEN_ASYMMETRIC_DRIVER=y
CONFIG_PSA_USE_CRACEN_ASYMMETRIC_SIGNATURE_DRIVER=y

# Link Time Optimizations
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
Expand Down
8 changes: 4 additions & 4 deletions subsys/nrf_security/cmake/generate_configs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ macro(generate_mbedcrypto_interface_configs)
kconfig_backup_current_config(CONFIG_MBEDTLS_PSA_CRYPTO_C)
kconfig_backup_current_config(CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
kconfig_backup_current_config(CONFIG_MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT)
kconfig_backup_current_config(CONFIG_MBEDTLS_THREADING)
kconfig_backup_current_config(CONFIG_MBEDTLS_THREADING_C)
kconfig_backup_current_config(CONFIG_MBEDTLS_THREADING_ALT)

message("=========== Checkpoint: backup ===============")
Expand Down Expand Up @@ -61,7 +61,7 @@ macro(generate_mbedcrypto_interface_configs)
kconfig_restore_backup_config(CONFIG_MBEDTLS_PSA_CRYPTO_C)
kconfig_restore_backup_config(CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
kconfig_restore_backup_config(CONFIG_MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT)
kconfig_restore_backup_config(CONFIG_MBEDTLS_THREADING)
kconfig_restore_backup_config(CONFIG_MBEDTLS_THREADING_C)
kconfig_restore_backup_config(CONFIG_MBEDTLS_THREADING_ALT)

message("=========== End psa_crypto_config ===============")
Expand All @@ -87,7 +87,7 @@ macro(generate_mbedcrypto_library_configs)
kconfig_backup_current_config(CONFIG_MBEDTLS_PSA_CRYPTO_SPM)
kconfig_backup_current_config(CONFIG_MBEDTLS_USE_PSA_CRYPTO)
kconfig_backup_current_config(CONFIG_MBEDTLS_PLATFORM_PRINTF_ALT)
kconfig_backup_current_config(CONFIG_MBEDTLS_THREADING)
kconfig_backup_current_config(CONFIG_MBEDTLS_THREADING_C)
kconfig_backup_current_config(CONFIG_MBEDTLS_THREADING_ALT)


Expand Down Expand Up @@ -135,7 +135,7 @@ macro(generate_mbedcrypto_library_configs)
kconfig_restore_backup_config(CONFIG_MBEDTLS_PSA_CRYPTO_SPM)
kconfig_restore_backup_config(CONFIG_MBEDTLS_USE_PSA_CRYPTO)
kconfig_restore_backup_config(CONFIG_MBEDTLS_PLATFORM_PRINTF_ALT)
kconfig_restore_backup_config(CONFIG_MBEDTLS_THREADING)
kconfig_restore_backup_config(CONFIG_MBEDTLS_THREADING_C)
kconfig_restore_backup_config(CONFIG_MBEDTLS_THREADING_ALT)

message("=========== End psa_crypto_library_config ===============")
Expand Down
1 change: 0 additions & 1 deletion subsys/nrf_security/tfm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ set(CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG True)
set(CONFIG_MBEDTLS_PSA_CRYPTO_C True)

if ("${PROJECT_NAME}" STREQUAL "Bootloader")
set(CONFIG_CC3XX_MBEDTLS_RSA_C True)
set(CONFIG_MBEDTLS_RSA_C True)
set(CONFIG_MBEDTLS_PKCS1_V21 True)
set(CONFIG_MBEDTLS_PSA_CRYPTO_SPM False)
Expand Down
4 changes: 0 additions & 4 deletions tests/crypto/src/common_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ extern char drbg_ctx;
#include <zephyr/drivers/entropy.h>
#endif

#if defined CONFIG_TV_ASSERT_USER_OVERRIDE
#include <tv_assert_user_override.h>
#endif

/**@brief Test vector expected result.
* Used to verify invalid behavior test cases.
*/
Expand Down