mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 04:53:08 +00:00
1510d8773b
* CCID: Improve request and response data handling - Add iso7816_set_response function: serves a helpers to set SW1 and SW2 values - improved iso7816_read_response_apdu by correctly parsing Lc and Le values - add client script to make testing easier * lint and rename * Format * Review changes: pragma once, typedef * Move command/response data and datalen into respective structures * Remove conditional for Lc=0 * Fix comment: Le * Make PVS happy and fix spelling Co-authored-by: あく <alleteam@gmail.com>
12 lines
No EOL
439 B
C
12 lines
No EOL
439 B
C
#pragma once
|
|
|
|
#define ISO7816_RESPONSE_OK 0x9000
|
|
|
|
#define ISO7816_RESPONSE_WRONG_LENGTH 0x6700
|
|
#define ISO7816_RESPONSE_WRONG_PARAMETERS_P1_P2 0x6A00
|
|
#define ISO7816_RESPONSE_WRONG_LE 0x6C00
|
|
#define ISO7816_RESPONSE_INSTRUCTION_NOT_SUPPORTED 0x6D00
|
|
#define ISO7816_RESPONSE_CLASS_NOT_SUPPORTED 0x6E00
|
|
#define ISO7816_RESPONSE_INTERNAL_EXCEPTION 0x6F00
|
|
|
|
void iso7816_set_response(ISO7816_Response_APDU* responseAPDU, uint16_t responseCode); |