hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
ifx-apdu-error.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 IFX_APDU_ERROR_H
9#define IFX_APDU_ERROR_H
10
11#include <stddef.h>
12#include <stdint.h>
13#include "infineon/ifx-error.h"
14#include "infineon/ifx-apdu.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
24#define IFX_ERROR_GET_APDU 0x05u
25
29#define IFX_ERRORS_NOT_REGISTERED 0x07u
30
34#define IFX_ERROR_MSG_EMPTY_MAP_LIST \
35 "Invalid error map list input. Cannot extract the error message."
36
40#define IFX_ERROR_MSG_UNAVAILABLE "Error description unavailable"
41
45#define IFX_EMPTY_STRING ""
46
51typedef struct
52{
53 uint8_t ins;
54 uint16_t sw;
55 uint8_t *message;
57
70 uint8_t apdu_error_map_list_length,
71 const ifx_apdu_t *apdu,
72 const ifx_apdu_response_t *response);
73
74#ifdef __cplusplus
75}
76
77#endif
78#endif // IFX_APDU_ERROR_H
uint8_t * ifx_apdu_error_get_message(ifx_apdu_error_map_t *apdu_error_map_list, uint8_t apdu_error_map_list_length, const ifx_apdu_t *apdu, const ifx_apdu_response_t *response)
Returns the error message with respect to the INS and SW.
APDU (response) en-/decoding utility.
Infineon specific error code creation and parsing.
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