Attest: Implement get token size API

Extend the attestation API with the implementation of
psa_initial_attest_get_token_size() function. It is
meant for retrieving the exact size of the initial
attestation token, but current version just returns
a hard coded value.

Replacement of handwritten veneers to the auto-generated
veneers.

Change-Id: Ibc91c6cdaeecec59c4e1f18576783cb55723e9ec
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
diff --git a/secure_fw/ns_callable/CMakeLists.inc b/secure_fw/ns_callable/CMakeLists.inc
index 80561db..a09ff13 100644
--- a/secure_fw/ns_callable/CMakeLists.inc
+++ b/secure_fw/ns_callable/CMakeLists.inc
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2017-2018, Arm Limited. All rights reserved.
+# Copyright (c) 2017-2019, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -27,8 +27,7 @@
                           "${CMAKE_CURRENT_LIST_DIR}/tfm_sst_veneers.c"
                           "${CMAKE_CURRENT_LIST_DIR}/tfm_audit_veneers.c"
                           "${CMAKE_CURRENT_LIST_DIR}/tfm_crypto_veneers.c"
-                          "${CMAKE_CURRENT_LIST_DIR}/tfm_platform_veneers.c"
-                          "${CMAKE_CURRENT_LIST_DIR}/tfm_initial_attestation_veneers.c")
+                          "${CMAKE_CURRENT_LIST_DIR}/tfm_platform_veneers.c")
 
 #Append all our source files to global lists.
 list(APPEND ALL_SRC_C ${SS_NS_CALLABLE_C_SRC})
diff --git a/secure_fw/ns_callable/tfm_initial_attestation_veneers.c b/secure_fw/ns_callable/tfm_initial_attestation_veneers.c
deleted file mode 100644
index df154d4..0000000
--- a/secure_fw/ns_callable/tfm_initial_attestation_veneers.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#include "tfm_initial_attestation_veneers.h"
-#include "secure_fw/services/initial_attestation/attestation.h"
-#include "tfm_secure_api.h"
-#include "tfm_api.h"
-#include "spm_partition_defs.h"
-#include "psa_client.h"
-
-__tfm_secure_gateway_attributes__
-enum psa_attest_err_t
-tfm_attest_veneer_get_token(const psa_invec  *in_vec,  uint32_t num_invec,
-                                  psa_outvec *out_vec, uint32_t num_outvec)
-{
-    TFM_CORE_SFN_REQUEST(TFM_SP_INITIAL_ATTESTATION_ID,
-                         initial_attest_get_token,
-                         in_vec,  num_invec,
-                         out_vec, num_outvec);
-}
diff --git a/secure_fw/ns_callable/tfm_veneers.c b/secure_fw/ns_callable/tfm_veneers.c
index c87fe30..ed69b94 100644
--- a/secure_fw/ns_callable/tfm_veneers.c
+++ b/secure_fw/ns_callable/tfm_veneers.c
@@ -47,6 +47,7 @@
 
 /******** TFM_SP_INITIAL_ATTESTATION ********/
 psa_status_t initial_attest_get_token(struct psa_invec *, size_t, struct psa_outvec *, size_t);
+psa_status_t initial_attest_get_token_size(struct psa_invec *, size_t, struct psa_outvec *, size_t);
 
 #ifdef TFM_PARTITION_TEST_CORE
 /******** TFM_SP_CORE_TEST ********/
@@ -117,6 +118,7 @@
 
 /******** TFM_SP_INITIAL_ATTESTATION ********/
 TFM_VENEER_FUNCTION(TFM_SP_INITIAL_ATTESTATION, initial_attest_get_token)
+TFM_VENEER_FUNCTION(TFM_SP_INITIAL_ATTESTATION, initial_attest_get_token_size)
 
 #ifdef TFM_PARTITION_TEST_CORE
 /******** TFM_SP_CORE_TEST ********/