blob: 6413cb9a29a2fa7f895c634c7ace1b6115539adb [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"
Julian Hallf5728962021-06-24 09:40:23 +010013 "${CMAKE_CURRENT_LIST_DIR}/crypto_context_pool.c"
Julian Hallc02fffb2020-11-23 18:22:06 +010014 )
15
16target_include_directories(${TGT}
17 PRIVATE
18 "${CMAKE_CURRENT_LIST_DIR}"
19 )
20
21# Force use of the mbed crypto configuration required by the crypto service
22# provider. This configuration includes enabling the use of the PSA ITS API
23# for persistent key storage which is realised by the its client adapter
24# for the secure storage service.
Balint Dobszay3c52ce62021-05-10 16:27:18 +020025set(MBEDTLS_USER_CONFIG_FILE
26 "${CMAKE_CURRENT_LIST_DIR}/config_mbedtls_user.h"
27 CACHE STRING "Configuration file for Mbed TLS" FORCE)
Julian Hallc02fffb2020-11-23 18:22:06 +010028
Balint Dobszay3c52ce62021-05-10 16:27:18 +020029set(MBEDTLS_EXTRA_INCLUDES
Julian Halla7e76c82021-04-14 11:12:11 +010030 "${TS_ROOT}/components/service/common/include"
31 "${TS_ROOT}/components/service/secure_storage/include"
Balint Dobszay3c52ce62021-05-10 16:27:18 +020032 CACHE STRING "PSA ITS for Mbed TLS" FORCE)