Align to PSA Attestation API tests
Fixes psa-api-test/initial_attestation deployments for linux_pc
and arm-linux. Also includes changes to enable tests to obtain
the public IAK and fetch and verify attestation token. The
attestation psa arch test currently fails because of a
hard-coded expectation that the attestation token only
contains a single sw component. On Linux platforms, there
are multiple sw components. Other verification checks on
the attestation token pass.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I7b380b8d1478bc340b5a4b133799c231f64942ff
diff --git a/deployments/psa-api-test/initial_attestation/iat-api-test.cmake b/deployments/psa-api-test/initial_attestation/iat-api-test.cmake
index 79655ff..55ecd4a 100644
--- a/deployments/psa-api-test/initial_attestation/iat-api-test.cmake
+++ b/deployments/psa-api-test/initial_attestation/iat-api-test.cmake
@@ -12,6 +12,20 @@
set(TS_ARCH_TEST_SUITE INITIAL_ATTESTATION CACHE STRING "Arch test suite")
#-------------------------------------------------------------------------------
+# Set additional defines needed for build.
+#-------------------------------------------------------------------------------
+set(TS_ARCH_TEST_EXTERNAL_DEFS
+ -DPSA_ALG_MD4=0x02000002
+ CACHE STRING "Arch test external defines")
+
+#-------------------------------------------------------------------------------
+# The arch test build system puts its build output under a test suite specific
+# subdirectory. The subdirectory name is different from the test suite name
+# so an additional define is needed to obtain the built library.
+#-------------------------------------------------------------------------------
+set(TS_ARCH_TEST_BUILD_SUBDIR initial_attestation CACHE STRING "Arch test build subdirectory")
+
+#-------------------------------------------------------------------------------
# Add attestation specific components.
#
#-------------------------------------------------------------------------------
@@ -21,6 +35,11 @@
COMPONENTS
"components/service/attestation/include"
"components/service/attestation/client/psa"
+ "components/service/attestation/client/provision"
+)
+
+target_sources(psa-api-test PRIVATE
+ ${TS_ROOT}/deployments/psa-api-test/initial_attestation/iat_locator.c
)
#-------------------------------------------------------------------------------