SST: Use get caller client ID API in SST
This change modifies SST service to use
tfm_core_get_caller_client_id(...), provided by the TF-M core, instead
of use the client ID provided by the dummy ID manager via the SST APIs.
The details of this change are:
- Remove client_id from the veneer API of SST (except for the read
operation, as referenced read is still possible)
- Remove the dummy ID manager
- Add documentation on how to integrate this new method to a NS
application
- Change Asset management to work with non-hardcoded secure
client ID
Change-Id: Ic97ea7aa5840d7e212adc009fa39c1c505440965
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/interface/include/tfm_sst_veneers.h b/interface/include/tfm_sst_veneers.h
index df62f75..6cfd5c1 100644
--- a/interface/include/tfm_sst_veneers.h
+++ b/interface/include/tfm_sst_veneers.h
@@ -18,7 +18,6 @@
* \brief Allocates space for the asset, referenced by asset UUID,
* without setting any data in the asset.
*
- * \param[in] client_id Client ID which calls the service
* \param[in] s_token Pointer to the asset's token \ref tfm_sst_token_t
* \param[in] asset_uuid Asset UUID \ref tfm_sst_asset_id_t
*
@@ -28,14 +27,12 @@
* PSA_SST_ERR_STORAGE_SYSTEM_FULL. If application id doesn't have the
* write rights, it returns PSA_SST_ERR_PERMS_NOT_ALLOWED.
*/
-enum psa_sst_err_t tfm_sst_veneer_create(int32_t client_id,
- uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_create(uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token);
/**
* \brief Gets asset's information referenced by asset UUID.
*
- * \param[in] client_id Client ID which calls the service
* \param[in] asset_uuid Asset UUID
* \param[in] s_token Pointer to the asset's token \ref tfm_sst_token_t
* \param[out] info Pointer to store the asset's information
@@ -43,15 +40,13 @@
*
* \return Returns error code as specified in \ref psa_sst_err_t
*/
-enum psa_sst_err_t tfm_sst_veneer_get_info(int32_t client_id,
- uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_get_info(uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
struct psa_sst_asset_info_t *info);
/**
* \brief Gets asset's attributes referenced by asset UUID.
*
- * \param[in] client_id Client ID which calls the service
* \param[in] asset_uuid Asset UUID
* \param[in] s_token Pointer to the asset's token \ref tfm_sst_token_t
* \param[out] attrs Pointer to store the asset's attributes
@@ -59,15 +54,13 @@
*
* \return Returns error code as specified in \ref psa_sst_err_t
*/
-enum psa_sst_err_t tfm_sst_veneer_get_attributes(int32_t client_id,
- uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_get_attributes(uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
struct psa_sst_asset_attrs_t *attrs);
/**
* \brief Sets asset's attributes referenced by asset UUID.
*
- * \param[in] client_id Client ID which calls the service
* \param[in] asset_uuid Asset UUID
* \param[in] s_token Pointer to the asset's token \ref tfm_sst_token_t
* \param[in] attrs Pointer to new the asset's attributes
@@ -75,8 +68,7 @@
*
* \return Returns error code as specified in \ref psa_sst_err_t
*/
-enum psa_sst_err_t tfm_sst_veneer_set_attributes(int32_t client_id,
- uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_set_attributes(uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
const struct psa_sst_asset_attrs_t *attrs);
@@ -105,7 +97,6 @@
/**
* \brief Writes data into an asset referenced by asset UUID.
*
- * \param[in] client_id Client ID which calls the service
* \param[in] asset_uuid Asset UUID
* \param[in] s_token Pointer to the asset's token \ref tfm_sst_token_t
* \param[in] data Pointer to data vector \ref tfm_sst_buf_t which
@@ -114,15 +105,13 @@
* \return Returns the number of bytes written or a castable \ref psa_sst_err_t
* value
*/
-enum psa_sst_err_t tfm_sst_veneer_write(int32_t client_id,
- uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_write(uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
struct tfm_sst_buf_t *data);
/**
* \brief Deletes the asset referenced by the asset UUID.
*
- * \param[in] client_id Client ID which calls the service
* \param[in] asset_uuid Asset UUID
* \param[in] s_token Pointer to the asset's token \ref tfm_sst_token_t
*
@@ -130,8 +119,7 @@
* to by this app ID. Returns PSA_SST_ERR_ASSET_REF_INVALID, if asset
* no longer exists. Otherwise, PSA_SST_ERR_SUCCESS.
*/
-enum psa_sst_err_t tfm_sst_veneer_delete(int32_t client_id,
- uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_delete(uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token);
#ifdef __cplusplus
}