blob: 0df1138ec3725685596394c573fd4f0a8093a334 [file] [log] [blame]
Julian Hallc02fffb2020-11-23 18:22:06 +01001#-------------------------------------------------------------------------------
Balint Dobszay3c52ce62021-05-10 16:27:18 +02002# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
Julian Hallc02fffb2020-11-23 18:22:06 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7if (NOT DEFINED TGT)
8 message(FATAL_ERROR "mandatory parameter TGT is not defined.")
9endif()
10
11target_sources(${TGT} PRIVATE
12 "${CMAKE_CURRENT_LIST_DIR}/crypto_provider.c"
13 )
14
15target_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 Dobszay3c52ce62021-05-10 16:27:18 +020024set(MBEDTLS_USER_CONFIG_FILE
25 "${CMAKE_CURRENT_LIST_DIR}/config_mbedtls_user.h"
26 CACHE STRING "Configuration file for Mbed TLS" FORCE)
Julian Hallc02fffb2020-11-23 18:22:06 +010027
Balint Dobszay3c52ce62021-05-10 16:27:18 +020028set(MBEDTLS_EXTRA_INCLUDES
Julian Halla7e76c82021-04-14 11:12:11 +010029 "${TS_ROOT}/components/service/common/include"
30 "${TS_ROOT}/components/service/secure_storage/include"
Balint Dobszay3c52ce62021-05-10 16:27:18 +020031 CACHE STRING "PSA ITS for Mbed TLS" FORCE)