aboutsummaryrefslogtreecommitdiff
path: root/secure_fw/partitions/initial_attestation/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'secure_fw/partitions/initial_attestation/CMakeLists.txt')
-rw-r--r--secure_fw/partitions/initial_attestation/CMakeLists.txt67
1 files changed, 31 insertions, 36 deletions
diff --git a/secure_fw/partitions/initial_attestation/CMakeLists.txt b/secure_fw/partitions/initial_attestation/CMakeLists.txt
index 9ba3abbdc9..d1838c4f5d 100644
--- a/secure_fw/partitions/initial_attestation/CMakeLists.txt
+++ b/secure_fw/partitions/initial_attestation/CMakeLists.txt
@@ -1,31 +1,28 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
#-------------------------------------------------------------------------------
if (NOT TFM_PARTITION_INITIAL_ATTESTATION)
- if(TFM_PARTITION_PSA_PROXY)
- add_library(tfm_attestation_defs INTERFACE)
-
- target_include_directories(tfm_attestation_defs
- INTERFACE
- .
- )
- endif()
return()
endif()
-cmake_minimum_required(VERSION 3.15)
-cmake_policy(SET CMP0079 NEW)
+cmake_minimum_required(VERSION 3.21)
+
+configure_file(${CMAKE_SOURCE_DIR}/interface/include/psa/initial_attestation.h.in
+ ${CMAKE_BINARY_DIR}/generated/interface/include/psa/initial_attestation.h)
add_library(tfm_psa_rot_partition_attestation STATIC)
+add_dependencies(tfm_psa_rot_partition_attestation manifest_tool)
+
target_sources(tfm_psa_rot_partition_attestation PRIVATE
tfm_attest.c
tfm_attest_req_mngr.c
attest_core.c
+ attest_boot_data.c
$<$<NOT:$<BOOL:${SYMMETRIC_INITIAL_ATTESTATION}>>:attest_asymmetric_key.c>
$<$<BOOL:${SYMMETRIC_INITIAL_ATTESTATION}>:attest_symmetric_key.c>
attest_token_encode.c
@@ -34,35 +31,41 @@ target_sources(tfm_psa_rot_partition_attestation PRIVATE
# The generated sources
target_sources(tfm_psa_rot_partition_attestation
PRIVATE
- $<$<BOOL:${TFM_PSA_API}>:
- ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/initial_attestation/auto_generated/intermedia_tfm_initial_attestation.c>
+ ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/initial_attestation/auto_generated/intermedia_tfm_initial_attestation.c
+)
+target_sources(tfm_partitions
+ INTERFACE
+ ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/initial_attestation/auto_generated/load_info_tfm_initial_attestation.c
)
+# Set include directory
target_include_directories(tfm_psa_rot_partition_attestation
PUBLIC
.
PRIVATE
${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/initial_attestation
)
+target_include_directories(tfm_partitions
+ INTERFACE
+ ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/initial_attestation
+)
target_link_libraries(tfm_psa_rot_partition_attestation
PRIVATE
- tfm_secure_api
platform_s
- tfm_qcbor
- tfm_t_cose
- secure_fw
- psa_interface
+ tfm_config
+ tfm_t_cose_s
tfm_sprt
+ tfm_boot_status
+ qcbor
)
target_compile_definitions(tfm_psa_rot_partition_attestation
PRIVATE
- $<$<CONFIG:Debug>:INCLUDE_TEST_CODE>
+ $<$<BOOL:${ATTEST_INCLUDE_TEST_CODE}>:INCLUDE_TEST_CODE>
$<$<BOOL:${SYMMETRIC_INITIAL_ATTESTATION}>:SYMMETRIC_INITIAL_ATTESTATION>
- $<$<BOOL:${ATTEST_INCLUDE_OPTIONAL_CLAIMS}>:INCLUDE_OPTIONAL_CLAIMS>
- $<$<BOOL:${ATTEST_INCLUDE_COSE_KEY_ID}>:INCLUDE_COSE_KEY_ID>
- $<$<NOT:$<BOOL:${PLATFORM_DUMMY_ATTEST_HAL}>>:CLAIM_VALUE_CHECK>
+ $<$<NOT:$<BOOL:${PLATFORM_DEFAULT_ATTEST_HAL}>>:CLAIM_VALUE_CHECK>
+ $<$<NOT:$<BOOL:${SYMMETRIC_INITIAL_ATTESTATION}>>:ATTEST_KEY_BITS=${ATTEST_KEY_BITS}>
)
########################### Attest defs ########################################
@@ -72,20 +75,12 @@ add_library(tfm_attestation_defs INTERFACE)
target_include_directories(tfm_attestation_defs
INTERFACE
.
+ ${CMAKE_BINARY_DIR}/generated/interface/include/
)
-############################ Secure API ########################################
-
-target_sources(tfm_sprt
- PRIVATE
- ${CMAKE_CURRENT_SOURCE_DIR}/tfm_attest_secure_api.c
-)
-
-# The veneers give warnings about not being properly declared so they get hidden
-# to not overshadow _real_ warnings.
-set_source_files_properties(tfm_attest_secure_api.c
- PROPERTIES
- COMPILE_FLAGS -Wno-implicit-function-declaration
+target_link_libraries(tfm_attestation_defs
+ INTERFACE
+ tfm_config
)
############################ Partition Defs ####################################
@@ -96,7 +91,7 @@ target_link_libraries(tfm_partitions
)
-target_compile_definitions(tfm_partition_defs
+target_compile_definitions(tfm_config
INTERFACE
- TFM_PARTITION_INITIAL_ATTESTATION
+ TFM_PARTITION_INITIAL_ATTESTATION
)