OPTIGA Trust M  1.1.0
C++ library for Optiga Trust M Chip Security Controller
pal_os_datastore.h File Reference

This file provides API prototypes of platform abstraction layer for datastore operations. More...

#include "pal.h"
Include dependency graph for pal_os_datastore.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID   (0x11)
 Identifier to store and read OPTIGA Platform Binding Shared secret on host platform. More...
 
#define OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED   (0x00)
 
#define OPTIGA_COMMS_MANAGE_CONTEXT_ID   (0x22)
 
#define OPTIGA_HIBERNATE_CONTEXT_ID   (0x33)
 
pal_status_t pal_os_datastore_read (uint16_t datastore_id, uint8_t *p_buffer, uint16_t *p_buffer_length)
 Reads data from the specified location for a given datastore_id. More...
 
pal_status_t pal_os_datastore_write (uint16_t datastore_id, const uint8_t *p_buffer, uint16_t length)
 Writes data to the specified location for a given datastore_id. More...
 

Detailed Description

This file provides API prototypes of platform abstraction layer for datastore operations.

Copyright (c) 2019 Infineon Technologies AG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

\endcopyright

Author
Infineon Technologies AG

Macro Definition Documentation

◆ OPTIGA_COMMS_MANAGE_CONTEXT_ID

#define OPTIGA_COMMS_MANAGE_CONTEXT_ID   (0x22)

◆ OPTIGA_HIBERNATE_CONTEXT_ID

#define OPTIGA_HIBERNATE_CONTEXT_ID   (0x33)

◆ OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED

#define OPTIGA_LIB_PAL_DATA_STORE_NOT_CONFIGURED   (0x00)

◆ OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID

#define OPTIGA_PLATFORM_BINDING_SHARED_SECRET_ID   (0x11)

Identifier to store and read OPTIGA Platform Binding Shared secret on host platform.

Function Documentation

◆ pal_os_datastore_read()

pal_status_t pal_os_datastore_read ( uint16_t  datastore_id,
uint8_t *  p_buffer,
uint16_t *  p_buffer_length 
)

Reads data from the specified location for a given datastore_id.

Reads data from the specified location for a given datastore_id.

  • Reads data from any configured specific location.
  • Once the timer expires, the registered callback function gets called from the timer event handler, if the call back is not NULL.
Precondition
  • None
Note
  • None
Parameters
[in]datastore_idDatastore id from where the data should be read.
[out]p_bufferValid Pointer to output buffer
[in,out]p_buffer_lengthValid Pointer to the data buffer length to store the read data length. The input value must be the data length to be read.
Return values
PAL_STATUS_SUCCESSOn successful execution
PAL_STATUS_FAILUREOn failure

◆ pal_os_datastore_write()

pal_status_t pal_os_datastore_write ( uint16_t  datastore_id,
const uint8_t *  p_buffer,
uint16_t  length 
)

Writes data to the specified location for a given datastore_id.

Writes data to the specified location for a given datastore_id.

  • Writes data to any configured specific location.
Precondition
  • None
Note
  • None
Parameters
[in]datastore_idDatastore id where the data should be written.
[in]p_bufferValid pointer to the input buffer
[in]lengthLength of the data to be written
Return values
PAL_STATUS_SUCCESSOn successful execution
PAL_STATUS_FAILUREOn failure