|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
Go to the source code of this file.
Functions | |
| bool | apdu_parse (const uint8_t *raw, size_t raw_len, apdu_t *apdu) |
| ISO 7816 APDU parsing/building helpers for CDC Badge OpenPGP stack. | |
| size_t | apdu_build_response (uint8_t *buf, size_t buf_max, const uint8_t *data, size_t data_len, uint16_t sw) |
| Builds APDU response payload with status word trailer. | |
| size_t apdu_build_response | ( | uint8_t * | buf, |
| size_t | buf_max, | ||
| const uint8_t * | data, | ||
| size_t | data_len, | ||
| uint16_t | sw ) |
Builds APDU response payload with status word trailer.
| buf | Output response buffer. |
| buf_max | Capacity of buf. |
| data | Optional payload bytes. |
| data_len | Payload length. |
| sw | ISO7816 status word. |
Definition at line 99 of file apdu.cpp.
Referenced by cmd_generate_keypair(), cmd_get_data(), cmd_internal_authenticate(), cmd_pso_cds(), cmd_pso_decipher(), cmd_pso_decipher_aes(), and openpgp_process_apdu().
| bool apdu_parse | ( | const uint8_t * | raw, |
| size_t | raw_len, | ||
| apdu_t * | apdu ) |
ISO 7816 APDU parsing/building helpers for CDC Badge OpenPGP stack.
Based on pico-openpgp (https://github.com/polhenarejos/pico-openpgp).
Parses raw APDU bytes into structured representation.
| raw | Raw APDU buffer. |
| raw_len | Length of raw. |
| apdu | Output APDU structure. |
Definition at line 17 of file apdu.cpp.
Referenced by openpgp_process_apdu().