hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
nbt-apdu.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2024-2026 Infineon Technologies AG
2// SPDX-License-Identifier: MIT
3
8#ifndef NBT_APDU_H
9#define NBT_APDU_H
10
13#include "infineon/ifx-apdu.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
24#define NBT_INIT UINT8_C(0x01)
25
29#define NBT_CMD_LOG_TAG "NBT_COMMAND"
30
34#define NBT_CLA UINT8_C(0x00)
35
40#define NBT_CLA_PASS_THROUGH UINT8_C(0x38)
41
45#define NBT_INS_SELECT UINT8_C(0xA4)
46
51#define NBT_P1_DEFAULT UINT8_C(0x00)
52
57#define NBT_P2_DEFAULT UINT8_C(0x00)
58
63#define NBT_P1_SELECT_BY_DF UINT8_C(0x04)
64
69#define NBT_LE_NONE UINT8_C(0x00)
70
110
128ifx_status_t nbt_initialize(nbt_cmd_t *self, ifx_protocol_t *protocol,
129 ifx_logger_t *logger);
130
138
145uint8_t *nbt_error_message_get(const nbt_cmd_t *self);
146
147#ifdef __cplusplus
148}
149
150#endif /* __cplusplus */
151#endif /* NBT_APDU_H */
APDU (response) error utility.
Generic protocol API for exchanging APDUs with secure elements.
APDU (response) en-/decoding utility.
uint32_t ifx_status_t
Custom return code type used by all Infineon host software libraries.
Definition ifx-error.h:91
Generic protocol API (ISO/OSI stack).
Provides the library and module identifiers code of the library.
uint8_t * nbt_error_message_get(const nbt_cmd_t *self)
Returns the error message for last command executed by NBT command set.
void nbt_destroy(nbt_cmd_t *self)
Releases the memory associated with NBT command set object (but not object itself).
ifx_status_t nbt_initialize(nbt_cmd_t *self, ifx_protocol_t *protocol, ifx_logger_t *logger)
Initializes NBT command set object by setting protocol members to valid values.
Struct that holds APDU Error's message with respective to the INS and SW.
Data storage struct for APDU response information.
Definition ifx-apdu.h:130
Data storage for APDU fields.
Definition ifx-apdu.h:89
Generic NBT command set structure for building and performing NBT commands.
Definition nbt-apdu.h:76
ifx_protocol_t * protocol
Private base layer in ISO/OSI stack.
Definition nbt-apdu.h:82
ifx_logger_t * logger
Private member for optional Logger.
Definition nbt-apdu.h:88
ifx_apdu_error_map_t * apdu_error_map_list
Private member holds an APDU error message map.
Definition nbt-apdu.h:103
ifx_apdu_response_t * response
Private member holds the response-APDU.
Definition nbt-apdu.h:98
uint8_t apdu_error_map_list_length
Private member holds an APDU error message map length.
Definition nbt-apdu.h:108
ifx_apdu_t * apdu
Private member holds the command-APDU.
Definition nbt-apdu.h:93