Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

fsl_shw_keystore.c File Reference


Detailed Description

File which implements a default keystore policy, for use as the system keystore.

Definition in file fsl_shw_keystore.c.

#include "fsl_platform.h"
#include "fsl_shw.h"
#include "fsl_shw_keystore.h"

Go to the source code of this file.

Defines

#define ACQUIRE_LOCK
#define LOCK_INCLUDES
#define RELEASE_LOCK
#define SCC_BYTE_OFFSET(bp)   ((uint32_t)(bp) % sizeof(uint32_t))
#define SCC_WORD_PTR(bp)   (((uint32_t)(bp)) & ~(sizeof(uint32_t)-1))

Functions

fsl_shw_return_t fsl_shw_establish_keystore (fsl_shw_uco_t *user_ctx, fsl_shw_kso_t *keystore)
void fsl_shw_init_keystore (fsl_shw_kso_t *keystore, fsl_shw_return_t(*data_init)(fsl_shw_uco_t *user_ctx, void **user_data), void(*data_cleanup)(fsl_shw_uco_t *user_ctx, void **user_data), fsl_shw_return_t(*slot_alloc)(void *user_data, uint32_t size, uint64_t owner_id, uint32_t *slot), fsl_shw_return_t(*slot_dealloc)(void *user_data, uint64_towner_id, uint32_t slot), fsl_shw_return_t(*slot_verify_access)(void *user_data, uint64_towner_id, uint32_tslot), void *(*slot_get_address)(void *user_data, uint32_t handle), uint32_t(*slot_get_base)(void *user_data, uint32_t handle), uint32_t(*slot_get_offset)(void *user_data, uint32_t handle), uint32_t(*slot_get_slot_size)(void *user_data, uint32_t handle))
void fsl_shw_init_keystore_default (fsl_shw_kso_t *keystore)
void fsl_shw_release_keystore (fsl_shw_uco_t *user_ctx, fsl_shw_kso_t *keystore)
fsl_shw_return_t keystore_slot_alloc (fsl_shw_kso_t *keystore, uint32_t size, uint64_t owner_id, uint32_t *slot)
fsl_shw_return_t keystore_slot_dealloc (fsl_shw_kso_t *keystore, uint64_t owner_id, uint32_t slot)
fsl_shw_return_t keystore_slot_decrypt (fsl_shw_uco_t *user_ctx, fsl_shw_kso_t *keystore, uint64_t owner_id, uint32_t slot, uint32_t length, const uint8_t *source)
fsl_shw_return_t keystore_slot_encrypt (fsl_shw_uco_t *user_ctx, fsl_shw_kso_t *keystore, uint64_t owner_id, uint32_t slot, uint32_t length, uint8_t *destination)
fsl_shw_return_t keystore_slot_load (fsl_shw_kso_t *keystore, uint64_t owner_id, uint32_t slot, const uint8_t *key_data, uint32_t key_length)
fsl_shw_return_t keystore_slot_read (fsl_shw_kso_t *keystore, uint64_t owner_id, uint32_t slot, uint32_t key_length, uint8_t *key_data)


Generated by  Doxygen 1.6.0   Back to index