SST: First public draft of PSA SST APIs
This patch releases the first public draft of Platform Security
Architecture (PSA) Secure Storage (SST) APIs.
The APIs are defined in psa_sst_api.h.
More information can be found in tfm_sst_integration_guide.md
The patch also accomodates the SST implementation and tests
accordingly.
Change-Id: Ibe537939f9692a86816fa0c7b2a8d070a502fd2c
Signed-off-by: Marc Moreno <marc.morenoberengue@arm.com>
diff --git a/interface/include/tfm_sst_veneers.h b/interface/include/tfm_sst_veneers.h
index 95a6b17..80bb3eb 100644
--- a/interface/include/tfm_sst_veneers.h
+++ b/interface/include/tfm_sst_veneers.h
@@ -22,16 +22,15 @@
* \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
*
- * \return Returns TFM_SST_ERR_SUCCESS if the asset has been created correctly.
+ * \return Returns PSA_SST_ERR_SUCCESS if the asset has been created correctly.
* If SST area is not prepared, it returns
- * TFM_SST_ERR_ASSET_NOT_PREPARED. If SST area is full, it returns
- * TFM_SST_ERR_STORAGE_SYSTEM_FULL. If application id doesn't have the
- * write rights, it returns TFM_SST_ERR_PERMS_NOT_ALLOWED.
+ * PSA_SST_ERR_ASSET_NOT_PREPARED. If SST area is full, it returns
+ * PSA_SST_ERR_STORAGE_SYSTEM_FULL. If application id doesn't have the
+ * write rights, it returns PSA_SST_ERR_PERMS_NOT_ALLOWED.
*/
-enum tfm_sst_err_t tfm_sst_veneer_create(uint32_t app_id, uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_create(uint32_t app_id, uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token);
-
/**
* \brief Gets asset's information referenced by asset UUID.
*
@@ -39,13 +38,13 @@
* \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
- * \ref tfm_sst_asset_info_t
+ * \ref psa_sst_asset_info_t
*
- * \return Returns error code as specified in \ref tfm_sst_err_t
+ * \return Returns error code as specified in \ref psa_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_veneer_get_info(uint32_t app_id, uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_get_info(uint32_t app_id, uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
- struct tfm_sst_asset_info_t *info);
+ struct psa_sst_asset_info_t *info);
/**
* \brief Gets asset's attributes referenced by asset UUID.
@@ -56,12 +55,12 @@
* \param[out] attrs Pointer to store the asset's attributes
* \ref tfm_sst_asset_attrs_t
*
- * \return Returns error code as specified in \ref tfm_sst_err_t
+ * \return Returns error code as specified in \ref psa_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_veneer_get_attributes(uint32_t app_id,
+enum psa_sst_err_t tfm_sst_veneer_get_attributes(uint32_t app_id,
uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
- struct tfm_sst_asset_attrs_t *attrs);
+ struct psa_sst_asset_attrs_t *attrs);
/**
* \brief Sets asset's attributes referenced by asset UUID.
@@ -70,14 +69,14 @@
* \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
- * \ref tfm_sst_asset_attrs_t
+ * \ref psa_sst_asset_attrs_t
*
- * \return Returns error code as specified in \ref tfm_sst_err_t
+ * \return Returns error code as specified in \ref psa_sst_err_t
*/
-enum tfm_sst_err_t tfm_sst_veneer_set_attributes(uint32_t app_id,
+enum psa_sst_err_t tfm_sst_veneer_set_attributes(uint32_t app_id,
uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
- const struct tfm_sst_asset_attrs_t *attrs);
+ const struct psa_sst_asset_attrs_t *attrs);
/**
* \brief Reads asset's data from asset referenced by asset UUID.
@@ -88,10 +87,10 @@
* \param[in/out] data Pointer to data vector \ref tfm_sst_buf_t to
* store data, size and offset
*
- * \return Returns the number of bytes written or a castable \ref tfm_sst_err_t
+ * \return Returns the number of bytes written or a castable \ref psa_sst_err_t
* value
*/
-enum tfm_sst_err_t tfm_sst_veneer_read(uint32_t app_id, uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_read(uint32_t app_id, uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
struct tfm_sst_buf_t *data);
@@ -104,10 +103,10 @@
* \param[in] data Pointer to data vector \ref tfm_sst_buf_t which
* contains the data to write
*
- * \return Returns the number of bytes written or a castable \ref tfm_sst_err_t
+ * \return Returns the number of bytes written or a castable \ref psa_sst_err_t
* value
*/
-enum tfm_sst_err_t tfm_sst_veneer_write(uint32_t app_id, uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_write(uint32_t app_id, uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
struct tfm_sst_buf_t *data);
@@ -118,13 +117,12 @@
* \param[in] asset_uuid Asset UUID
* \param[in] s_token Pointer to the asset's token \ref tfm_sst_token_t
*
- * \return Returns TFM_SST_ERR_PERMS_NOT_ALLOWED if the asset can't be deleted
- * to by this app ID. Returns TFM_SST_ERR_ASSET_REF_INVALID, if asset
- * no longer exists. Otherwise, TFM_SST_ERR_SUCCESS.
+ * \return Returns PSA_SST_ERR_PERMS_NOT_ALLOWED if the asset can't be deleted
+ * to by this app ID. Returns PSA_SST_ERR_ASSET_REF_INVALID, if asset
+ * no longer exists. Otherwise, PSA_SST_ERR_SUCCESS.
*/
-enum tfm_sst_err_t tfm_sst_veneer_delete(uint32_t app_id, uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_veneer_delete(uint32_t app_id, uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token);
-
#ifdef __cplusplus
}
#endif