The CCID stack currently implemented in Flipper operates in short APDU mode, which supports only 256 bytes for the data length. The buffer on furi_hal_usb_ccid.c already supports this size - however the data types on the callback functions are still using uint32_t instead of uint8_t. This PR updates the callbacks so they use uint8_t as the proper type for the data length
Verification
Start the CCID app and verify that the device was successfully detected as a CCID device with the command:
opensc-tool --atr
The command above shoud return 3b:00
Check that example 1 works with:
opensc-tool --send-apdu 01:01:00:00
The command above should return
Received (SW1=0x90, SW2=0x00)`
Check that example 2 works with:
opensc-tool --send-apdu 01:02:00:00
The command above should return:
Received (SW1=0x90, SW2=0x01):
62 63 bc
Check that example 3 works with:
opensc-tool --send-apdu 01:03:00:00:02:CA:FE
The command above should return:
Received (SW1=0x90, SW2=0x02):
CA FE ..
Checklist (For Reviewer)
[ ] PR has description of feature/bug or link to Confluence/Jira task
[ ] Description contains actions to verify feature/bugfix
[ ] I've built this code, uploaded it to the device and verified feature/bugfix
What's new
The CCID stack currently implemented in Flipper operates in short APDU mode, which supports only 256 bytes for the data length. The buffer on furi_hal_usb_ccid.c already supports this size - however the data types on the callback functions are still using uint32_t instead of uint8_t. This PR updates the callbacks so they use uint8_t as the proper type for the data length
Verification
The command above shoud return
3b:00
The command above should return
The command above should return:
The command above should return:
Checklist (For Reviewer)