From 89e1113931ca74520968d5a6f7c6508932bfb96b Mon Sep 17 00:00:00 2001 From: Juha Ylinen Date: Thu, 30 Jan 2025 10:50:22 +0200 Subject: [PATCH] [nrf noup] samples: psa: Fix issues Set CONFIG_TFM_PROFILE_TYPE_MEDIUM for boards with TF-M to enable ITS and PS. Enable CONFIG_PSA_WANT_GENERATE_RANDOM to fix persistent_key sample. native_sim requires ECB cipher to be enabled. Signed-off-by: Juha Ylinen --- samples/psa/its/overlay-secure_storage.conf | 3 +++ samples/psa/its/sample.yaml | 2 ++ samples/psa/persistent_key/overlay-secure_storage.conf | 3 +++ samples/psa/persistent_key/sample.yaml | 3 +++ 4 files changed, 11 insertions(+) diff --git a/samples/psa/its/overlay-secure_storage.conf b/samples/psa/its/overlay-secure_storage.conf index 3473ae38910..8ff0c17ebcb 100644 --- a/samples/psa/its/overlay-secure_storage.conf +++ b/samples/psa/its/overlay-secure_storage.conf @@ -3,6 +3,9 @@ CONFIG_MBEDTLS=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y +# native_sim requires ECB cipher to be enabled +CONFIG_PSA_WANT_ALG_ECB_NO_PADDING=y + # The default stack size (1024) is not enough for the PSA Crypto core. # On top of that, the ITS implementation uses the stack for buffers. CONFIG_MAIN_STACK_SIZE=3072 diff --git a/samples/psa/its/sample.yaml b/samples/psa/its/sample.yaml index c4ee3543696..024c065ba74 100644 --- a/samples/psa/its/sample.yaml +++ b/samples/psa/its/sample.yaml @@ -13,6 +13,8 @@ common: tests: sample.psa.its.tfm: filter: CONFIG_BUILD_WITH_TFM + extra_args: + - CONFIG_TFM_PROFILE_TYPE_MEDIUM=y tags: - trusted-firmware-m sample.psa.its.secure_storage.entropy_driver: diff --git a/samples/psa/persistent_key/overlay-secure_storage.conf b/samples/psa/persistent_key/overlay-secure_storage.conf index 3473ae38910..8ff0c17ebcb 100644 --- a/samples/psa/persistent_key/overlay-secure_storage.conf +++ b/samples/psa/persistent_key/overlay-secure_storage.conf @@ -3,6 +3,9 @@ CONFIG_MBEDTLS=y CONFIG_MBEDTLS_PSA_CRYPTO_C=y +# native_sim requires ECB cipher to be enabled +CONFIG_PSA_WANT_ALG_ECB_NO_PADDING=y + # The default stack size (1024) is not enough for the PSA Crypto core. # On top of that, the ITS implementation uses the stack for buffers. CONFIG_MAIN_STACK_SIZE=3072 diff --git a/samples/psa/persistent_key/sample.yaml b/samples/psa/persistent_key/sample.yaml index 01cf9f450d1..89ced48f5b4 100644 --- a/samples/psa/persistent_key/sample.yaml +++ b/samples/psa/persistent_key/sample.yaml @@ -13,6 +13,9 @@ common: tests: sample.psa.persistent_key.tfm: filter: CONFIG_BUILD_WITH_TFM + extra_args: + - CONFIG_TFM_PROFILE_TYPE_MEDIUM=y + - CONFIG_PSA_WANT_GENERATE_RANDOM=y tags: - trusted-firmware-m sample.psa.persistent_key.secure_storage.entropy_driver: