-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
To reduce the amount of memory required on the stack, we may find a way to prevent copying the data when transmitting short APDUs.
Implementation Note
The copying happens in the tx_short_apdu function.
Lines 150 to 161 in bb3678d
| static int tx_short_apdu( | |
| fido_dev_t *dev, | |
| const iso7816_header_t *h, | |
| const uint8_t *payload, | |
| uint8_t payload_len, | |
| uint8_t cla_flags | |
| ) { | |
| // TODO: Prevent copying if possible. | |
| uint8_t apdu[5 + UINT8_MAX]; | |
| uint8_t status_word[2]; | |
| size_t apdu_len; | |
| int ok = FIDO_ERR_TX; |
This currently allocates (mostly, depending on the platform) 263 bytes, which may not be toooo bad.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request