![]() |
TF-M Reference Manual
1.2.0
TrustedFirmware-M
|
Go to the source code of this file.
Macros | |
#define | ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0])) |
#define | API_DISPATCH(sfn_name) |
#define | API_DISPATCH_NO_INVEC(sfn_name) |
#define | API_DISPATCH_NO_OUTVEC(sfn_name) |
Functions | |
psa_status_t | psa_audit_retrieve_record (const uint32_t record_index, const uint32_t buffer_size, const uint8_t *token, const uint32_t token_size, uint8_t *buffer, uint32_t *record_size) |
Retrieves a record at the specified index. More... | |
psa_status_t | psa_audit_get_info (uint32_t *num_records, uint32_t *size) |
Returns the total number and size of the records stored. More... | |
psa_status_t | psa_audit_get_record_info (const uint32_t record_index, uint32_t *size) |
Returns the size of the record at the specified index. More... | |
psa_status_t | psa_audit_delete_record (const uint32_t record_index, const uint8_t *token, const uint32_t token_size) |
Deletes a record at the specified index. More... | |
psa_status_t | psa_audit_add_record (const struct psa_audit_record *record) |
Adds a record. More... | |
#define API_DISPATCH | ( | sfn_name | ) |
Definition at line 14 of file tfm_audit_func_api.c.
#define API_DISPATCH_NO_INVEC | ( | sfn_name | ) |
Definition at line 19 of file tfm_audit_func_api.c.
#define API_DISPATCH_NO_OUTVEC | ( | sfn_name | ) |
Definition at line 24 of file tfm_audit_func_api.c.
#define ARRAY_SIZE | ( | arr | ) | (sizeof(arr)/sizeof(arr[0])) |
Definition at line 12 of file tfm_audit_func_api.c.
psa_status_t psa_audit_add_record | ( | const struct psa_audit_record * | record | ) |
Adds a record.
This function adds a record. This is a Secure only callable function
[in] | record | Pointer to the memory buffer containing the record to be added |
Definition at line 96 of file tfm_audit_func_api.c.
psa_status_t psa_audit_delete_record | ( | const uint32_t | record_index, |
const uint8_t * | token, | ||
const uint32_t | token_size | ||
) |
Deletes a record at the specified index.
The function removes a record at the specified index. It passes an authorisation token for removal which is a MAC of the plain text
[in] | record_index | Index of the record to be removed. Currently, only the removal of the oldest entry, i.e. record_index 0 is supported |
[in] | token | Must be set to NULL. Token used as authorisation for removal of the specified record_index |
[in] | token_size | Must be set to 0. Size in bytes of the token used as authorisation for removal |
Definition at line 81 of file tfm_audit_func_api.c.
psa_status_t psa_audit_get_info | ( | uint32_t * | num_records, |
uint32_t * | size | ||
) |
Returns the total number and size of the records stored.
The function returns the total size in bytes and the total number of records stored
[out] | num_records | Total number of records stored |
[out] | size | Total size of the records stored, in bytes |
Definition at line 52 of file tfm_audit_func_api.c.
psa_status_t psa_audit_get_record_info | ( | const uint32_t | record_index, |
uint32_t * | size | ||
) |
Returns the size of the record at the specified index.
The function returns the size of the record at the given index provided as input
[in] | record_index | Index of the record to return the size |
[out] | size | Size of the specified record, in bytes |
Definition at line 65 of file tfm_audit_func_api.c.
psa_status_t psa_audit_retrieve_record | ( | const uint32_t | record_index, |
const uint32_t | buffer_size, | ||
const uint8_t * | token, | ||
const uint32_t | token_size, | ||
uint8_t * | buffer, | ||
uint32_t * | record_size | ||
) |
Retrieves a record at the specified index.
The function retrieves an item specified by index and returns it on the buffer provided. The token is passed as a challenge value for the encryption scheme
[in] | record_index | Index of the record to retrieve |
[in] | buffer_size | Size in bytes of the provided buffer |
[in] | token | Must be set to NULL. Token used as a challenge for encryption, to protect against rollback attacks |
[in] | token_size | Must be set to 0. Size in bytes of the token used as challenge |
[out] | buffer | Buffer used to store the retrieved record |
[out] | record_size | Size in bytes of the retrieved record |
Definition at line 29 of file tfm_audit_func_api.c.