Commit Graph

20 Commits

Author SHA1 Message Date
Sosthène Guédon
cf6fedc5b2 Migrate to interchange 0.3.0 2023-02-14 10:45:07 +01:00
Sosthène Guédon
fa83d6bca5 Add a new request type for incorrect commands and return errors for invalid Select commands 2023-02-06 17:11:05 +01:00
Sosthène Guédon
28ac8cd592 Fix clippy warnings 2023-02-06 16:54:51 +01:00
Sosthène Guédon
923a731d31 Run cargo fmt 2023-02-06 16:54:51 +01:00
Sosthène Guédon
fe40478467 Replace Aid::new with Aid::try_new
Fixes #7
2023-02-06 16:09:20 +01:00
Robin Krahl
f3533d1722 Fix maximum response length check
To decide whether we send out the response in whole or in chunks, we not
only have to compare the length with the maximum length supported by
interchange but also with the maximum response length specified in the
request APDU.
2023-02-06 15:47:27 +01:00
Sosthène Guédon
d1b8498ba3 Fix panic on response larger than interchanges::SIZE or response::SIZE 2022-08-22 13:43:52 +02:00
Sosthène Guédon
e30785029e Add tests for response chaning and custom Le field 2022-08-22 13:43:52 +02:00
Sosthène Guédon
ae33862987 Fix tests with response chaining
The absence of an `Le` field in a command means that no response is
expected. This commit adds 0x00 as an `Le` field to signify that the
maximum length possible is expected
2022-08-22 13:43:52 +02:00
Sosthène Guédon
3cf0ba8106 Use hex-literal in tests 2022-08-22 13:43:52 +02:00
Conor Patrick
b4a4204693 fix select bug, refactor tests to new app+heapless 2021-07-13 16:47:37 -07:00
Conor Patrick
4ae64d8733 fix tests and add ci 2021-05-26 21:24:35 -07:00
Nicolas Stalder
c3d3798ef1 The great renaming
- name things by what they are
- try and make then names human readable
2021-04-25 16:31:25 +02:00
Conor Patrick
759177a577 add test and logging to tests 2021-04-25 16:31:25 +02:00
Conor Patrick
e4dcf88b32 update apdu-dispatch for new Data reply 2021-04-25 16:31:25 +02:00
Conor Patrick
3627ffbee5 update apdu dispatch tests 2021-04-13 23:14:07 +02:00
Nicolas Stalder
5a502a77b6 Further cleanup; give up on heapless PR, external interchange/trussed 2021-02-26 18:06:44 +01:00
Conor Patrick
842d860682 rework apdu-dispatch to significantly reduce stack overhead 2020-10-09 16:20:12 +02:00
Conor Patrick
08d3631ef2 rework apdu-dispatch, add apdu chaining
- APDU parsing now only occurs in apdu-dispatch, instead of both iso14443 and usbd-ccid
- apdu-dispatch now handles apdu chaining transparently to the apps.
- More tests added to cover chaining and apdu parsing
2020-10-09 16:20:12 +02:00
Conor Patrick
76d9f28692 Make apdu-dispatch build standalone and fix tests 2020-10-09 16:20:12 +02:00