Skip to content

Commit

Permalink
[nrf noup] samples: psa: Fix issues
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
juhaylinen authored and anangl committed Feb 7, 2025
1 parent 6696c98 commit 89e1113
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions samples/psa/its/overlay-secure_storage.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions samples/psa/its/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions samples/psa/persistent_key/overlay-secure_storage.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions samples/psa/persistent_key/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 89e1113

Please sign in to comment.