Attest: Set features with config header file
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: Ida7dd261415ac660a425931624a658d766745b91
diff --git a/config/config_base.cmake b/config/config_base.cmake
index d95ae58..4e3ddf7 100755
--- a/config/config_base.cmake
+++ b/config/config_base.cmake
@@ -130,10 +130,6 @@
set(TFM_PARTITION_INITIAL_ATTESTATION OFF CACHE BOOL "Enable Initial Attestation partition")
set(SYMMETRIC_INITIAL_ATTESTATION OFF CACHE BOOL "Use symmetric crypto for inital attestation")
-set(ATTEST_INCLUDE_OPTIONAL_CLAIMS ON CACHE BOOL "Include optional claims in initial attestation token")
-set(ATTEST_INCLUDE_COSE_KEY_ID OFF CACHE BOOL "Include COSE key-id in initial attestation token")
-set(ATTEST_TOKEN_PROFILE "PSA_IOT_1" CACHE STRING "Set the initial attestation token profile. Options: PSA_IOT_1, PSA_2_0_0, ARM_CCA")
-set(ATTEST_STACK_SIZE "0x700" CACHE STRING "The stack size of the Initial Attestation Secure Partition")
set(ATTEST_INCLUDE_TEST_CODE OFF CACHE BOOL "Include minimal development tests in the initial attestation regression test suite")
set(ATTEST_KEY_BITS 256 CACHE STRING "The size of the initial attestation key in bits")
diff --git a/config/config_base.h b/config/config_base.h
index e524db7..501fcb6 100644
--- a/config/config_base.h
+++ b/config/config_base.h
@@ -83,4 +83,18 @@
/* The stack size of the Firmware Update Secure Partition */
#define FWU_STACK_SIZE 0x600
+/* Attest Partition Configs */
+
+/* Include optional claims in initial attestation token */
+#define ATTEST_INCLUDE_OPTIONAL_CLAIMS 1
+
+/* Include COSE key-id in initial attestation token */
+#define ATTEST_INCLUDE_COSE_KEY_ID 0
+
+/* The stack size of the Initial Attestation Secure Partition */
+#define ATTEST_STACK_SIZE 0x700
+
+/* Set the initial attestation token profile */
+#define ATTEST_TOKEN_PROFILE_PSA_IOT_1 1
+
#endif /* __CONFIG_BASE_H__ */
diff --git a/config/profile/config_profile_large.h b/config/profile/config_profile_large.h
index 8e09d71..9ee21e1 100644
--- a/config/profile/config_profile_large.h
+++ b/config/profile/config_profile_large.h
@@ -83,4 +83,18 @@
/* The stack size of the Firmware Update Secure Partition */
#define FWU_STACK_SIZE 0x600
+/* Attest Partition Configs */
+
+/* Include optional claims in initial attestation token */
+#define ATTEST_INCLUDE_OPTIONAL_CLAIMS 1
+
+/* Include COSE key-id in initial attestation token */
+#define ATTEST_INCLUDE_COSE_KEY_ID 0
+
+/* The stack size of the Initial Attestation Secure Partition */
+#define ATTEST_STACK_SIZE 0x700
+
+/* Set the initial attestation token profile */
+#define ATTEST_TOKEN_PROFILE_PSA_IOT_1 1
+
#endif /* __CONFIG_PROFILE_LARGE_H__ */
diff --git a/config/profile/config_profile_medium.h b/config/profile/config_profile_medium.h
index 83b93e4..a8bf346 100644
--- a/config/profile/config_profile_medium.h
+++ b/config/profile/config_profile_medium.h
@@ -83,4 +83,18 @@
/* The stack size of the Firmware Update Secure Partition */
#define FWU_STACK_SIZE 0x600
+/* Attest Partition Configs */
+
+/* Include optional claims in initial attestation token */
+#define ATTEST_INCLUDE_OPTIONAL_CLAIMS 1
+
+/* Include COSE key-id in initial attestation token */
+#define ATTEST_INCLUDE_COSE_KEY_ID 0
+
+/* The stack size of the Initial Attestation Secure Partition */
+#define ATTEST_STACK_SIZE 0x700
+
+/* Set the initial attestation token profile */
+#define ATTEST_TOKEN_PROFILE_PSA_IOT_1 1
+
#endif /* __CONFIG_PROFILE_MEDIUM_H__ */
diff --git a/config/profile/config_profile_medium_arotless.h b/config/profile/config_profile_medium_arotless.h
index 59ca891..6fe338b 100644
--- a/config/profile/config_profile_medium_arotless.h
+++ b/config/profile/config_profile_medium_arotless.h
@@ -83,4 +83,18 @@
/* The stack size of the Firmware Update Secure Partition */
#define FWU_STACK_SIZE 0x600
+/* Attest Partition Configs */
+
+/* Include optional claims in initial attestation token */
+#define ATTEST_INCLUDE_OPTIONAL_CLAIMS 1
+
+/* Include COSE key-id in initial attestation token */
+#define ATTEST_INCLUDE_COSE_KEY_ID 0
+
+/* The stack size of the Initial Attestation Secure Partition */
+#define ATTEST_STACK_SIZE 0x700
+
+/* Set the initial attestation token profile */
+#define ATTEST_TOKEN_PROFILE_PSA_IOT_1 1
+
#endif /* __CONFIG_PROFILE_MEDIUM_AROTLESS_H__ */
diff --git a/config/profile/config_profile_small.h b/config/profile/config_profile_small.h
index a3e0fac..368b5e6 100644
--- a/config/profile/config_profile_small.h
+++ b/config/profile/config_profile_small.h
@@ -80,4 +80,18 @@
/* The stack size of the Firmware Update Secure Partition */
#define FWU_STACK_SIZE 0x600
+/* Attest Partition Configs */
+
+/* Include optional claims in initial attestation token */
+#define ATTEST_INCLUDE_OPTIONAL_CLAIMS 1
+
+/* Include COSE key-id in initial attestation token */
+#define ATTEST_INCLUDE_COSE_KEY_ID 0
+
+/* The stack size of the Initial Attestation Secure Partition */
+#define ATTEST_STACK_SIZE 0x700
+
+/* Set the initial attestation token profile */
+#define ATTEST_TOKEN_PROFILE_PSA_IOT_1 1
+
#endif /* __CONFIG_PROFILE_SMALL_H__ */
diff --git a/config/tests/config_test_psa_api.h b/config/tests/config_test_psa_api.h
index a4c02f2..816b62c 100644
--- a/config/tests/config_test_psa_api.h
+++ b/config/tests/config_test_psa_api.h
@@ -83,4 +83,18 @@
/* The stack size of the Firmware Update Secure Partition */
#define FWU_STACK_SIZE 0x600
+/* Attest Partition Configs */
+
+/* Include optional claims in initial attestation token */
+#define ATTEST_INCLUDE_OPTIONAL_CLAIMS 1
+
+/* Include COSE key-id in initial attestation token */
+#define ATTEST_INCLUDE_COSE_KEY_ID 0
+
+/* The stack size of the Initial Attestation Secure Partition */
+#define ATTEST_STACK_SIZE 0x700
+
+/* Set the initial attestation token profile */
+#define ATTEST_TOKEN_PROFILE_PSA_IOT_1 1
+
#endif /* __CONFIG_TEST_PSA_API_H__ */