Attest: Fix undefined profile error when disabled
Also fix an undefined link error, also when the partition is disabled.
Change-Id: I871c1d0876e382f9d796d756ef329e38b1a701c1
Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt
index b8a55b2..6418681 100755
--- a/platform/CMakeLists.txt
+++ b/platform/CMakeLists.txt
@@ -87,7 +87,7 @@
tfm_partition_defs
$<$<BOOL:${PLATFORM_DEFAULT_ATTEST_HAL}>:tfm_sprt>
$<$<BOOL:${TFM_PARTITION_CRYPTO}>:crypto_service_mbedcrypto>
- tfm_attestation_defs
+ $<$<BOOL:${TFM_PARTITION_INITIAL_ATTESTATION}>:tfm_attestation_defs>
)
target_compile_definitions(platform_s
diff --git a/platform/ext/common/provisioning.c b/platform/ext/common/provisioning.c
index 8d2c93a..d90a863 100644
--- a/platform/ext/common/provisioning.c
+++ b/platform/ext/common/provisioning.c
@@ -95,7 +95,11 @@
#elif defined(ATTEST_TOKEN_PROFILE_PSA_2_0_0)
"http://arm.com/psa/2.0.0",
#else
+#ifdef TFM_PARTITION_INITIAL_ATTESTATION
#error "Attestation token profile is incorrect"
+#else
+ "UNDEFINED",
+#endif /* TFM_PARTITION_INITIAL_ATTESTATION */
#endif
/* Entropy seed */
{