Julian Hall | c02fffb | 2020-11-23 18:22:06 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Julian Hall | 9061e6c | 2021-06-29 14:24:20 +0100 | [diff] [blame^] | 2 | # Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
Julian Hall | c02fffb | 2020-11-23 18:22:06 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | if (NOT DEFINED TGT) |
| 8 | message(FATAL_ERROR "mandatory parameter TGT is not defined.") |
| 9 | endif() |
| 10 | |
| 11 | target_sources(${TGT} PRIVATE |
Julian Hall | 9061e6c | 2021-06-29 14:24:20 +0100 | [diff] [blame^] | 12 | "${CMAKE_CURRENT_LIST_DIR}/mbedcrypto_backend.c" |
Julian Hall | c02fffb | 2020-11-23 18:22:06 +0100 | [diff] [blame] | 13 | ) |
| 14 | |
| 15 | # Force use of the mbed crypto configuration required by the crypto service |
| 16 | # provider. This configuration includes enabling the use of the PSA ITS API |
| 17 | # for persistent key storage which is realised by the its client adapter |
| 18 | # for the secure storage service. |
Balint Dobszay | 3c52ce6 | 2021-05-10 16:27:18 +0200 | [diff] [blame] | 19 | set(MBEDTLS_USER_CONFIG_FILE |
| 20 | "${CMAKE_CURRENT_LIST_DIR}/config_mbedtls_user.h" |
| 21 | CACHE STRING "Configuration file for Mbed TLS" FORCE) |
Julian Hall | c02fffb | 2020-11-23 18:22:06 +0100 | [diff] [blame] | 22 | |
Balint Dobszay | 3c52ce6 | 2021-05-10 16:27:18 +0200 | [diff] [blame] | 23 | set(MBEDTLS_EXTRA_INCLUDES |
Julian Hall | a7e76c8 | 2021-04-14 11:12:11 +0100 | [diff] [blame] | 24 | "${TS_ROOT}/components/service/common/include" |
| 25 | "${TS_ROOT}/components/service/secure_storage/include" |
Balint Dobszay | 3c52ce6 | 2021-05-10 16:27:18 +0200 | [diff] [blame] | 26 | CACHE STRING "PSA ITS for Mbed TLS" FORCE) |