Julian Hall | c02fffb | 2020-11-23 18:22:06 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Balint Dobszay | 3c52ce6 | 2021-05-10 16:27:18 +0200 | [diff] [blame] | 2 | # Copyright (c) 2020-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 |
| 12 | "${CMAKE_CURRENT_LIST_DIR}/crypto_provider.c" |
| 13 | ) |
| 14 | |
| 15 | target_include_directories(${TGT} |
| 16 | PRIVATE |
| 17 | "${CMAKE_CURRENT_LIST_DIR}" |
| 18 | ) |
| 19 | |
| 20 | # Force use of the mbed crypto configuration required by the crypto service |
| 21 | # provider. This configuration includes enabling the use of the PSA ITS API |
| 22 | # for persistent key storage which is realised by the its client adapter |
| 23 | # for the secure storage service. |
Balint Dobszay | 3c52ce6 | 2021-05-10 16:27:18 +0200 | [diff] [blame] | 24 | set(MBEDTLS_USER_CONFIG_FILE |
| 25 | "${CMAKE_CURRENT_LIST_DIR}/config_mbedtls_user.h" |
| 26 | CACHE STRING "Configuration file for Mbed TLS" FORCE) |
Julian Hall | c02fffb | 2020-11-23 18:22:06 +0100 | [diff] [blame] | 27 | |
Balint Dobszay | 3c52ce6 | 2021-05-10 16:27:18 +0200 | [diff] [blame] | 28 | set(MBEDTLS_EXTRA_INCLUDES |
Julian Hall | a7e76c8 | 2021-04-14 11:12:11 +0100 | [diff] [blame^] | 29 | "${TS_ROOT}/components/service/common/include" |
| 30 | "${TS_ROOT}/components/service/secure_storage/include" |
Balint Dobszay | 3c52ce6 | 2021-05-10 16:27:18 +0200 | [diff] [blame] | 31 | CACHE STRING "PSA ITS for Mbed TLS" FORCE) |