|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
Response parser for apdu-nbt commands. More...
Go to the source code of this file.
Data Structures | |
| struct | nbt_applet_version_t |
| Structure for the applet version. More... | |
| struct | nbt_available_memory_t |
| Structure for the available memory. More... | |
Macros | |
| #define | NBT_GET_DATA_RESP_PARSER UINT8_C(0x01) |
| Identifier for command get response parser available memory. | |
| #define | NBT_GET_DATA_MEMORY_RESP_HEADER_LEN UINT8_C(0x05) |
| Length of the header tags of the available memory. | |
| #define | NBT_LENGTH_TLV UINT8_C(0x04) |
| Length of one memory TLV is present in the response. | |
| #define | NBT_GET_DATA_DEFAULT_RESP_TAG UINT8_C(0x6F) |
| Get data response will contain this tag as a reference. | |
| #define | NBT_TAG_DEFAULT_GET_DATA UINT8_C(0xDF) |
| Default get data tag. | |
| #define | NBT_TAG_APPLET_VERSION UINT8_C(0x3A) |
| Offset for applet version type in the get data. | |
| #define | NBT_TAG_AVAILABLE_MEMORY UINT8_C(0x3B) |
| Offset for available memory type in the get data. | |
| #define | NBT_LEN_FILE_CONTROL_INFO UINT8_C(0x07) |
| File control information length for applet version. | |
| #define | NBT_LEN_APPLET_VERSION UINT8_C(0x04) |
| Length of applet version. | |
| #define | NBT_LEN_AVAILABLE_MEMORY_INFO UINT8_C(0x0F) |
| Available memory information length for the applet. | |
| #define | NBT_LEN_AVAILABLE_MEMORY UINT8_C(0x0C) |
| Available memory length. | |
| #define | NBT_GET_DATA_TLV_LEN_VALUE UINT8_C(0x02) |
| Length of memory data stored in the get data response. | |
| #define | NBT_GET_DATA_TAG_AVAILABLE_NVM_MEMORY UINT8_C(0xC6) |
| Available persistent or NVM memory. | |
| #define | NBT_GET_DATA_TAG_AVAILABLE_TRANSIENT_COR UINT8_C(0xC7) |
| Available transient of clear on reset (COR) type. | |
| #define | NBT_GET_DATA_TAG_AVAILABLE_TRANSIENT_COD UINT8_C(0xC8) |
| Available transient of clear on deselect (COD) type. | |
Functions | |
| ifx_status_t | nbt_parse_applet_version (const ifx_apdu_response_t *response, nbt_applet_version_t *applet_version) |
| Gets the response data and returns the applet version. | |
| ifx_status_t | nbt_parse_available_memory (const ifx_apdu_response_t *response, nbt_available_memory_t *available_memory) |
| Gets the response data and returns the available memory. | |
Response parser for apdu-nbt commands.
Definition in file nbt-parse-response.h.
| #define NBT_GET_DATA_DEFAULT_RESP_TAG UINT8_C(0x6F) |
Get data response will contain this tag as a reference.
Definition at line 39 of file nbt-parse-response.h.
| #define NBT_GET_DATA_MEMORY_RESP_HEADER_LEN UINT8_C(0x05) |
Length of the header tags of the available memory.
Definition at line 29 of file nbt-parse-response.h.
| #define NBT_GET_DATA_RESP_PARSER UINT8_C(0x01) |
Identifier for command get response parser available memory.
Definition at line 24 of file nbt-parse-response.h.
| #define NBT_GET_DATA_TAG_AVAILABLE_NVM_MEMORY UINT8_C(0xC6) |
Available persistent or NVM memory.
Definition at line 84 of file nbt-parse-response.h.
| #define NBT_GET_DATA_TAG_AVAILABLE_TRANSIENT_COD UINT8_C(0xC8) |
Available transient of clear on deselect (COD) type.
Definition at line 94 of file nbt-parse-response.h.
| #define NBT_GET_DATA_TAG_AVAILABLE_TRANSIENT_COR UINT8_C(0xC7) |
Available transient of clear on reset (COR) type.
Definition at line 89 of file nbt-parse-response.h.
| #define NBT_GET_DATA_TLV_LEN_VALUE UINT8_C(0x02) |
Length of memory data stored in the get data response.
Definition at line 79 of file nbt-parse-response.h.
| #define NBT_LEN_APPLET_VERSION UINT8_C(0x04) |
Length of applet version.
Definition at line 64 of file nbt-parse-response.h.
| #define NBT_LEN_AVAILABLE_MEMORY UINT8_C(0x0C) |
Available memory length.
Definition at line 74 of file nbt-parse-response.h.
| #define NBT_LEN_AVAILABLE_MEMORY_INFO UINT8_C(0x0F) |
Available memory information length for the applet.
Definition at line 69 of file nbt-parse-response.h.
| #define NBT_LEN_FILE_CONTROL_INFO UINT8_C(0x07) |
File control information length for applet version.
Definition at line 59 of file nbt-parse-response.h.
| #define NBT_LENGTH_TLV UINT8_C(0x04) |
Length of one memory TLV is present in the response.
Definition at line 34 of file nbt-parse-response.h.
| #define NBT_TAG_APPLET_VERSION UINT8_C(0x3A) |
Offset for applet version type in the get data.
Definition at line 49 of file nbt-parse-response.h.
| #define NBT_TAG_AVAILABLE_MEMORY UINT8_C(0x3B) |
Offset for available memory type in the get data.
Definition at line 54 of file nbt-parse-response.h.
| #define NBT_TAG_DEFAULT_GET_DATA UINT8_C(0xDF) |
Default get data tag.
Definition at line 44 of file nbt-parse-response.h.
| ifx_status_t nbt_parse_applet_version | ( | const ifx_apdu_response_t * | response, |
| nbt_applet_version_t * | applet_version ) |
Gets the response data and returns the applet version.
| [in] | response | APDU response object in parameter contains the response data. |
| [out] | applet_version | Applet version out parameter object to store the applet version. |
| IFX_SUCCESS | : If API operation is successful |
| IFX_ILLEGAL_ARGUMENT | : If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | : If memory allocation fails |
| ifx_status_t nbt_parse_available_memory | ( | const ifx_apdu_response_t * | response, |
| nbt_available_memory_t * | available_memory ) |
Gets the response data and returns the available memory.
| [in] | response | APDU response object in parameter contains response data. |
| [out] | available_memory | Available memory out parameter object to store the available memory. |
| IFX_SUCCESS | : If API operation is successful |
| IFX_ILLEGAL_ARGUMENT | : If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | : If memory allocation fails |