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/src/tfm_sst_api.c b/interface/src/tfm_sst_api.c
index 6af6320..790435f 100644
--- a/interface/src/tfm_sst_api.c
+++ b/interface/src/tfm_sst_api.c
@@ -8,7 +8,7 @@
#include "tfm_sst_defs.h"
#include "tfm_ns_lock.h"
-enum tfm_sst_err_t tfm_sst_create(uint32_t asset_uuid, const uint8_t* token,
+enum psa_sst_err_t psa_sst_create(uint32_t asset_uuid, const uint8_t* token,
uint32_t token_size)
{
struct tfm_sst_token_t s_token;
@@ -24,10 +24,10 @@
0);
}
-enum tfm_sst_err_t tfm_sst_get_info(uint32_t asset_uuid,
+enum psa_sst_err_t psa_sst_get_info(uint32_t asset_uuid,
const uint8_t* token,
uint32_t token_size,
- struct tfm_sst_asset_info_t *info)
+ struct psa_sst_asset_info_t *info)
{
struct tfm_sst_token_t s_token;
@@ -42,10 +42,10 @@
0);
}
-enum tfm_sst_err_t tfm_sst_get_attributes(uint32_t asset_uuid,
+enum psa_sst_err_t psa_sst_get_attributes(uint32_t asset_uuid,
const uint8_t* token,
uint32_t token_size,
- struct tfm_sst_asset_attrs_t *attrs)
+ struct psa_sst_asset_attrs_t *attrs)
{
struct tfm_sst_token_t s_token;
@@ -60,10 +60,10 @@
0);
}
-enum tfm_sst_err_t tfm_sst_set_attributes(uint32_t asset_uuid,
+enum psa_sst_err_t psa_sst_set_attributes(uint32_t asset_uuid,
const uint8_t* token,
uint32_t token_size,
- const struct tfm_sst_asset_attrs_t *attrs)
+ const struct psa_sst_asset_attrs_t *attrs)
{
struct tfm_sst_token_t s_token;
@@ -78,7 +78,7 @@
0);
}
-enum tfm_sst_err_t tfm_sst_read(uint32_t asset_uuid,
+enum psa_sst_err_t psa_sst_read(uint32_t asset_uuid,
const uint8_t* token,
uint32_t token_size,
uint32_t size,
@@ -104,7 +104,7 @@
0);
}
-enum tfm_sst_err_t tfm_sst_write(uint32_t asset_uuid,
+enum psa_sst_err_t psa_sst_write(uint32_t asset_uuid,
const uint8_t* token,
uint32_t token_size,
uint32_t size,
@@ -130,7 +130,7 @@
0);
}
-enum tfm_sst_err_t tfm_sst_delete(uint32_t asset_uuid,
+enum psa_sst_err_t psa_sst_delete(uint32_t asset_uuid,
const uint8_t* token,
uint32_t token_size)
{
diff --git a/interface/src/tfm_sst_svc_handler.c b/interface/src/tfm_sst_svc_handler.c
index 8277169c..27b4d90 100644
--- a/interface/src/tfm_sst_svc_handler.c
+++ b/interface/src/tfm_sst_svc_handler.c
@@ -11,7 +11,7 @@
#include "tfm_id_mngr.h"
/* SVC function implementations */
-enum tfm_sst_err_t tfm_sst_svc_create(uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_svc_create(uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token)
{
uint32_t app_id;
@@ -21,9 +21,9 @@
return tfm_sst_veneer_create(app_id, asset_uuid, s_token);
}
-enum tfm_sst_err_t tfm_sst_svc_get_info(uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_svc_get_info(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)
{
uint32_t app_id;
@@ -32,9 +32,9 @@
return tfm_sst_veneer_get_info(app_id, asset_uuid, s_token, info);
}
-enum tfm_sst_err_t tfm_sst_svc_get_attributes(uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_svc_get_attributes(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)
{
uint32_t app_id;
@@ -43,9 +43,9 @@
return tfm_sst_veneer_get_attributes(app_id, asset_uuid, s_token, attrs);
}
-enum tfm_sst_err_t tfm_sst_svc_set_attributes(uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_svc_set_attributes(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)
{
uint32_t app_id;
@@ -54,7 +54,7 @@
return tfm_sst_veneer_set_attributes(app_id, asset_uuid, s_token, attrs);
}
-enum tfm_sst_err_t tfm_sst_svc_read(uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_svc_read(uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
struct tfm_sst_buf_t* data)
{
@@ -65,7 +65,7 @@
return tfm_sst_veneer_read(app_id, asset_uuid, s_token, data);
}
-enum tfm_sst_err_t tfm_sst_svc_write(uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_svc_write(uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token,
struct tfm_sst_buf_t* data)
{
@@ -76,7 +76,7 @@
return tfm_sst_veneer_write(app_id, asset_uuid, s_token, data);
}
-enum tfm_sst_err_t tfm_sst_svc_delete(uint32_t asset_uuid,
+enum psa_sst_err_t tfm_sst_svc_delete(uint32_t asset_uuid,
const struct tfm_sst_token_t *s_token)
{
uint32_t app_id;