File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,10 @@ else()
180180endif ()
181181
182182if (CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 OR CONFIG_BOOT_ENCRYPT_EC256)
183- if (MBEDTLS_ASN1_DIR)
183+ # When ECDSA PSA is used, do not pull in additional ASN.1 include
184+ # directories or sources, as it would cause incorrect header files
185+ # to be included.
186+ if (MBEDTLS_ASN1_DIR AND NOT CONFIG_BOOT_ECDSA_PSA)
184187 zephyr_library_include_directories(
185188 ${MBEDTLS_ASN1_DIR} /include
186189 )
Original file line number Diff line number Diff line change @@ -113,6 +113,14 @@ config BOOT_X25519_PSA_DEPENDENCIES
113113
114114endif # BOOT_ENCRYPT_IMAGE
115115
116+ config BOOT_ECDSA_PSA_DEPENDENCIES
117+ bool
118+ select PSA_WANT_ALG_ECDSA
119+ select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
120+ select PSA_WANT_ECC_SECP_R1_256
121+ help
122+ Dependencies for ECDSA signature
123+
116124if MBEDTLS_ENABLE_HEAP
117125
118126config MBEDTLS_HEAP_SIZE
@@ -282,6 +290,16 @@ config BOOT_ECDSA_CC310
282290 select NRF_CC310_BL
283291 select NRFXLIB_CRYPTO
284292 select BOOT_USE_CC310
293+
294+ config BOOT_ECDSA_PSA
295+ bool "Use psa cryptoo"
296+ select BOOT_USE_PSA_CRYPTO
297+ select PSA_CRYPTO_CLIENT
298+ select PSA_CRYPTO_C
299+ select BOOT_IMG_HASH_ALG_SHA256_ALLOW
300+ select BOOT_IMG_HASH_ALG_SHA512_ALLOW
301+ select BOOT_ECDSA_PSA_DEPENDENCIES
302+
285303endchoice # Ecdsa implementation
286304endif
287305
You can’t perform that action at this time.
0 commit comments