#include "common.h"
#if defined(MBEDTLS_PSA_ITS_FILE_C)
#include "mbedtls/platform.h"
#if defined(_WIN32)
#include <windows.h>
#endif
#include "psa_crypto_its.h"
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#if !defined(PSA_ITS_STORAGE_PREFIX)
#define PSA_ITS_STORAGE_PREFIX …
#endif
#define PSA_ITS_STORAGE_FILENAME_PATTERN …
#define PSA_ITS_STORAGE_SUFFIX …
#define PSA_ITS_STORAGE_FILENAME_LENGTH …
#define PSA_ITS_STORAGE_TEMP …
#define PSA_ITS_MAX_SIZE …
#define PSA_ITS_MAGIC_STRING …
#define PSA_ITS_MAGIC_LENGTH …
#if defined(_WIN32)
#define rename_replace_existing …
#else
#define rename_replace_existing(oldpath, newpath) …
#endif
psa_its_file_header_t;
static void psa_its_fill_filename(psa_storage_uid_t uid, char *filename)
{ … }
static psa_status_t psa_its_read_file(psa_storage_uid_t uid,
struct psa_storage_info_t *p_info,
FILE **p_stream)
{ … }
psa_status_t psa_its_get_info(psa_storage_uid_t uid,
struct psa_storage_info_t *p_info)
{ … }
psa_status_t psa_its_get(psa_storage_uid_t uid,
uint32_t data_offset,
uint32_t data_length,
void *p_data,
size_t *p_data_length)
{ … }
psa_status_t psa_its_set(psa_storage_uid_t uid,
uint32_t data_length,
const void *p_data,
psa_storage_create_flags_t create_flags)
{ … }
psa_status_t psa_its_remove(psa_storage_uid_t uid)
{ … }
#endif