blob: 4b531b767f3173d7527dcee6a0f088658832acf4 [file] [log] [blame]
Julian Hallc02fffb2020-11-23 18:22:06 +01001#-------------------------------------------------------------------------------
Julian Hall9061e6c2021-06-29 14:24:20 +01002# Copyright (c) 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
Julian Hall9061e6c2021-06-29 14:24:20 +010012 "${CMAKE_CURRENT_LIST_DIR}/mbedcrypto_backend.c"
Julian Hallc02fffb2020-11-23 18:22:06 +010013 )
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 Dobszay3c52ce62021-05-10 16:27:18 +020019set(MBEDTLS_USER_CONFIG_FILE
20 "${CMAKE_CURRENT_LIST_DIR}/config_mbedtls_user.h"
21 CACHE STRING "Configuration file for Mbed TLS" FORCE)
Julian Hallc02fffb2020-11-23 18:22:06 +010022
Balint Dobszay3c52ce62021-05-10 16:27:18 +020023set(MBEDTLS_EXTRA_INCLUDES
Julian Halla7e76c82021-04-14 11:12:11 +010024 "${TS_ROOT}/components/service/common/include"
25 "${TS_ROOT}/components/service/secure_storage/include"
Balint Dobszay3c52ce62021-05-10 16:27:18 +020026 CACHE STRING "PSA ITS for Mbed TLS" FORCE)