Macros | |
#define | OPTIGA_UTIL_WRITE_ONLY (0x00) |
Option to only write the data object. | |
#define | OPTIGA_UTIL_ERASE_AND_WRITE (0x40) |
Option to erase and write the data object. | |
Typedefs | |
typedef enum eOID_d | eOID_d |
Typedef for OIDs. | |
Enumerations | |
enum | eOID_d { eLCS_G = 0xE0C0, eSECURITY_STATUS_G = 0xE0C1, eCOPROCESSOR_UID = 0xE0C2, eSLEEP_MODE_ACTIVATION_DELAY = 0xE0C3, eCURRENT_LIMITATION = 0xE0C4, eSECURITY_EVENT_COUNTER = 0xE0C5, eDEVICE_PUBKEY_CERT_IFX = 0xE0E0, eDEVICE_PUBKEY_CERT_PRJSPC_1 = 0xE0E1, eDEVICE_PUBKEY_CERT_PRJSPC_2 = 0xE0E2, eDEVICE_PUBKEY_CERT_PRJSPC_3 = 0xE0E3, eFIRST_DEVICE_PRIKEY_1 = 0xE0F0, eFIRST_DEVICE_PRIKEY_2 = 0xE0F1, eFIRST_DEVICE_PRIKEY_3 = 0xE0F2, eFIRST_DEVICE_PRIKEY_4 = 0xE0F3, eLCS_A = 0xF1C0, eSECURITY_STATUS_A = 0xF1C1, eERROR_CODES = 0xF1C2 } |
Typedef for OIDs. More... | |
Functions | |
optiga_lib_status_t | optiga_util_open_application (optiga_comms_t *p_comms) |
Initializes the communication with optiga. More... | |
optiga_lib_status_t | optiga_util_read_data (uint16_t optiga_oid, uint16_t offset, uint8_t *buffer, uint16_t *bytes_to_read) |
Reads data from optiga. More... | |
optiga_lib_status_t | optiga_util_read_metadata (uint16_t optiga_oid, uint8_t *buffer, uint16_t *bytes_to_read) |
Reads metadata of a data object from optiga. More... | |
optiga_lib_status_t | optiga_util_write_data (uint16_t optiga_oid, uint8_t write_type, uint16_t offset, uint8_t *buffer, uint16_t bytes_to_write) |
Writes data to optiga. More... | |
optiga_lib_status_t | optiga_util_write_metadata (uint16_t optiga_oid, uint8_t *buffer, uint8_t bytes_to_write) |
Writes metadata for the user provided data object. More... | |
enum eOID_d |
Typedef for OIDs.
optiga_lib_status_t optiga_util_open_application | ( | optiga_comms_t * | p_comms | ) |
Initializes the communication with optiga.
Initializes the communication with OPTIGA for the given instance.
Pre Conditions:
API Details:
[in] | p_comms | Pointer to the communication parameters initialised before |
OPTIGA_LIB_SUCCESS | Successful invocation of optiga cmd module |
OPTIGA_LIB_ERROR | Error during function execution |
optiga_lib_status_t optiga_util_read_data | ( | uint16_t | optiga_oid, |
uint16_t | offset, | ||
uint8_t * | buffer, | ||
uint16_t * | bytes_to_read | ||
) |
Reads data from optiga.
Retrieves the requested data that is stored from the user provided data object.
Pre Conditions:
API Details:
Notes:
[in] | optiga_oid | OID of data object
|
[in] | offset | Offset from within data object
|
[in,out] | buffer | Valid pointer to the buffer to which data is read |
[in,out] | bytes_to_read | Valid pointer to the length of data to be read from data object
|
OPTIGA_LIB_SUCCESS | Successful invocation of optiga cmd module |
OPTIGA_LIB_ERROR | Wrong Input arguments provided or error occured |
optiga_lib_status_t optiga_util_read_metadata | ( | uint16_t | optiga_oid, |
uint8_t * | buffer, | ||
uint16_t * | bytes_to_read | ||
) |
Reads metadata of a data object from optiga.
Reads the metadata of the user provided data object.
Pre Conditions:
API Details:
Notes:
[in] | optiga_oid | OID of data object
|
[in,out] | buffer | Valid pointer to the buffer to which metadata is read |
[in,out] | bytes_to_read | Valid pointer to the length of metadata to be read from data object
|
OPTIGA_LIB_SUCCESS | Successful invocation of optiga cmd module |
OPTIGA_LIB_ERROR | Wrong Input arguments provided or error occured |
optiga_lib_status_t optiga_util_write_data | ( | uint16_t | optiga_oid, |
uint8_t | write_type, | ||
uint16_t | offset, | ||
uint8_t * | buffer, | ||
uint16_t | bytes_to_write | ||
) |
Writes data to optiga.
Writes the data provided by the user into the specified data object.
Pre Conditions:
API Details:
Notes:
[in] | optiga_oid | OID of data object
|
[in] | write_type | Type of the write operation. Can be OPTIGA_UTIL_ERASE_AND_WRITE or OPTIGA_UTIL_WRITE_ONLY |
[in] | offset | Offset from within data object
|
[in,out] | buffer | Valid pointer to the buffer with user data to write |
[in] | bytes_to_write | Length of data to be written |
OPTIGA_LIB_SUCCESS | Successful invocation of optiga cmd module |
OPTIGA_LIB_ERROR | Wrong Input arguments provided or error occured |
optiga_lib_status_t optiga_util_write_metadata | ( | uint16_t | optiga_oid, |
uint8_t * | buffer, | ||
uint8_t | bytes_to_write | ||
) |
Writes metadata for the user provided data object.
Writes metadata for the user provided data object.
Pre Conditions:
API Details:
Notes:
[in] | optiga_oid | OID of data object
|
[in,out] | buffer | Valid pointer to the buffer with metadata to write |
[in] | bytes_to_write | Length of metadata to be written |
OPTIGA_LIB_SUCCESS | Successful invocation of optiga cmd module |
OPTIGA_LIB_ERROR | Wrong Input arguments provided or error occured |