4#ifndef PSA_PROTECTED_STORAGE_H
5#define PSA_PROTECTED_STORAGE_H
13#ifdef CONFIG_SECURE_STORAGE_PS_IMPLEMENTATION_ITS
15#define ITS_UID (secure_storage_its_uid_t){.uid = uid, \
16 .caller_id = SECURE_STORAGE_ITS_CALLER_PSA_PS}
24#define PSA_PS_API_VERSION_MAJOR 1
25#define PSA_PS_API_VERSION_MINOR 0
52#ifdef CONFIG_SECURE_STORAGE_PS_IMPLEMENTATION_ITS
83 size_t data_size,
void *p_data,
size_t *p_data_length)
85#ifdef CONFIG_SECURE_STORAGE_PS_IMPLEMENTATION_ITS
112#ifdef CONFIG_SECURE_STORAGE_PS_IMPLEMENTATION_ITS
140#ifdef CONFIG_SECURE_STORAGE_PS_IMPLEMENTATION_ITS
175#ifdef CONFIG_SECURE_STORAGE_PS_SUPPORTS_SET_EXTENDED
211 size_t data_length,
const void *p_data)
213#ifdef CONFIG_SECURE_STORAGE_PS_SUPPORTS_SET_EXTENDED
233#ifdef CONFIG_SECURE_STORAGE_PS_SUPPORTS_SET_EXTENDED
The secure storage ITS implementation.
psa_status_t secure_storage_its_remove(secure_storage_its_uid_t uid)
See psa_its_remove(), to which this function is analogous.
psa_status_t secure_storage_its_set(secure_storage_its_uid_t uid, size_t data_length, const void *p_data, psa_storage_create_flags_t create_flags)
See psa_its_set(), to which this function is analogous.
psa_status_t secure_storage_its_get(secure_storage_its_uid_t uid, size_t data_offset, size_t data_size, void *p_data, size_t *p_data_length)
See psa_its_get(), to which this function is analogous.
psa_status_t secure_storage_its_get_info(secure_storage_its_uid_t uid, struct psa_storage_info_t *p_info)
See psa_its_get_info(), to which this function is analogous.
flags
Definition parser.h:96
psa_status_t psa_ps_remove(psa_storage_uid_t uid)
Removes the provided uid and its associated data.
Definition protected_storage.h:138
psa_status_t psa_ps_set_extended(psa_storage_uid_t uid, size_t data_offset, size_t data_length, const void *p_data)
Writes part of the data associated with the provided uid.
Definition protected_storage.h:210
psa_status_t psa_ps_get(psa_storage_uid_t uid, size_t data_offset, size_t data_size, void *p_data, size_t *p_data_length)
Retrieves data associated with the provided uid.
Definition protected_storage.h:82
uint32_t psa_ps_get_support(void)
Lists optional features.
Definition protected_storage.h:229
psa_status_t psa_ps_create(psa_storage_uid_t uid, size_t capacity, psa_storage_create_flags_t create_flags)
Reserves storage for the provided uid.
Definition protected_storage.h:172
psa_status_t psa_ps_set(psa_storage_uid_t uid, size_t data_length, const void *p_data, psa_storage_create_flags_t create_flags)
Creates a new or modifies an existing entry.
Definition protected_storage.h:49
psa_status_t psa_ps_get_info(psa_storage_uid_t uid, struct psa_storage_info_t *p_info)
Retrieves the metadata of a given entry.
Definition protected_storage.h:110
The secure storage PS implementation.
psa_status_t secure_storage_ps_get(const psa_storage_uid_t uid, size_t data_offset, size_t data_length, void *p_data, size_t *p_data_length)
See psa_ps_get(), to which this function is analogous.
psa_status_t secure_storage_ps_set(const psa_storage_uid_t uid, size_t data_length, const void *p_data, psa_storage_create_flags_t create_flags)
See psa_ps_set(), to which this function is analogous.
psa_status_t secure_storage_ps_set_extended(psa_storage_uid_t uid, size_t data_offset, size_t data_length, const void *p_data)
See psa_ps_set_extended(), to which this function is analogous.
psa_status_t secure_storage_ps_create(psa_storage_uid_t uid, size_t capacity, psa_storage_create_flags_t create_flags)
See psa_ps_create(), to which this function is analogous.
psa_status_t secure_storage_ps_remove(const psa_storage_uid_t uid)
See psa_ps_remove(), to which this function is analogous.
psa_status_t secure_storage_ps_get_info(const psa_storage_uid_t uid, struct psa_storage_info_t *p_info)
See psa_ps_get_info(), to which this function is analogous.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Common definitions of the PSA Secure Storage API.
uint32_t psa_storage_create_flags_t
Flags used when creating an entry.
Definition storage_common.h:26
#define PSA_STORAGE_SUPPORT_SET_EXTENDED
Flag indicating that psa_ps_create() and psa_ps_set_extended() are supported.
Definition storage_common.h:48
uint64_t psa_storage_uid_t
UID type for identifying entries.
Definition storage_common.h:23
Metadata associated with a specific entry.
Definition storage_common.h:38
int32_t psa_status_t
Definition error.h:13
#define PSA_ERROR_NOT_SUPPORTED
Definition error.h:19