Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
store.h File Reference

The secure storage ITS store module. More...

Go to the source code of this file.

Functions

psa_status_t secure_storage_its_store_set (secure_storage_its_uid_t uid, size_t data_length, const void *data)
 Writes the data of an ITS entry to the storage medium.
psa_status_t secure_storage_its_store_get (secure_storage_its_uid_t uid, size_t data_size, void *data, size_t *data_length)
 Retrieves the data of an ITS entry from the storage medium.
psa_status_t secure_storage_its_store_remove (secure_storage_its_uid_t uid)
 Removes an ITS entry from the storage medium.

Detailed Description

The secure storage ITS store module.

The functions declared in this header implement the ITS store module. They are meant to be called only by the ITS implementation. This header may be included when providing a custom implementation of the ITS store module (

CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_CUSTOM 

).

The ITS implementation serializes the operations that modify the storage medium, but a retrieval can happen concurrently with one of them. The operations must therefore be atomic with respect to each other, so that a retrieval returns either the previous or the new data of an entry, never a mix of both.

Function Documentation

◆ secure_storage_its_store_get()

psa_status_t secure_storage_its_store_get ( secure_storage_its_uid_t uid,
size_t data_size,
void * data,
size_t * data_length )

Retrieves the data of an ITS entry from the storage medium.

Parameters
[in]uidThe entry's UID.
[in]data_sizeThe size of data in bytes.
[out]dataThe buffer to which the entry's stored data is written.
[out]data_lengthOn success, the number of bytes written to data. May be less than data_size.
Return values
PSA_SUCCESSThe read succeeded.
PSA_ERROR_DOES_NOT_EXISTThe entry was not found from the storage.
PSA_ERROR_STORAGE_FAILURESome storage failure happened.

◆ secure_storage_its_store_remove()

psa_status_t secure_storage_its_store_remove ( secure_storage_its_uid_t uid)

Removes an ITS entry from the storage medium.

Parameters
uidThe entry's UID.
Returns
PSA_SUCCESS on success, anything else on failure.

◆ secure_storage_its_store_set()

psa_status_t secure_storage_its_store_set ( secure_storage_its_uid_t uid,
size_t data_length,
const void * data )

Writes the data of an ITS entry to the storage medium.

Parameters
uidThe entry's UID.
data_lengthThe number of bytes in data.
dataThe data to store.
Returns
One of the return values of psa_its_set().