Commit Graph

36 Commits

Author SHA1 Message Date
Fabian Kaczmarczyck
f90d43a6a1 implements alwaysUv and makeCredUvNotRqd 2021-02-05 18:57:39 +01:00
Fabian Kaczmarczyck
371e8b6f35 remove conditional trait implementation 2021-02-02 05:46:03 +01:00
Fabian Kaczmarczyck
da27848c27 updates license header to 2021 in ctap 2021-01-12 19:13:43 +01:00
Kamran Khan
35bdfe90ed Re-instate the length check for Le bytes 2020-12-14 04:54:25 -08:00
Kamran Khan
dbbdddd58b Fix error codes 2020-12-14 03:45:13 -08:00
Kamran Khan
5882a6a3cc Fix ApduStatusCode->u16 implementation 2020-12-10 23:40:47 -08:00
Kamran Khan
f74d1b9ffd Return error when Le calculation overflows 2020-12-10 21:27:52 -08:00
Kamran Khan
a7eb38aac8 Use checked sub 2020-12-10 21:26:44 -08:00
Kamran Khan
9c9f9efcce Merge remote-tracking branch 'upstream/master' into ctap1-new-apdu-parser 2020-12-10 21:18:53 -08:00
Kamran Khan
29dbff7a40 The great ApduStatusCode encroachment 2020-12-10 20:15:05 -08:00
Kamran Khan
21bdbd8114 Use integers instead of ByteArray for the ApduStatusCode enum 2020-12-10 20:01:06 -08:00
Kamran Khan
162c00a0d1 Simplify Le length calculation 2020-12-10 19:54:25 -08:00
Kamran Khan
0da13cd61f De-deuplicate le length calculation 2020-12-09 20:43:06 -08:00
Jean-Michel Picod
62dd088cd0 Add missing license header. 2020-12-09 18:55:08 +01:00
Kamran Khan
2d17bb2afa Readability improvements 2020-12-07 23:38:21 -08:00
Kamran Khan
373464b72d Remove redundant type declaration 2020-12-07 23:35:47 -08:00
Kamran Khan
4c84e94039 Use new APDU parser in CTAP1 code 2020-12-07 21:23:55 -08:00
Fabian Kaczmarczyck
21b8ad18ce fix clippy warning in apdu 2020-12-04 13:41:56 +01:00
Kamran Khan
1eaff57c88 Le should be interpreted as 0x10000 even in the 2-byte case 2020-12-03 08:25:34 -08:00
Kamran Khan
4bfce88e9b Remove indention level made redundant by early-return 2020-12-03 08:14:07 -08:00
Kamran Khan
bec94f02be Tweak Le appropriately depending on its swize 2020-12-03 08:10:44 -08:00
Kamran Khan
cc8bdb982d Remove unknown apdu type 2020-12-03 07:55:34 -08:00
Kamran Khan
69cdd4a0dc Use (relatively more) appropriate error code) 2020-12-03 07:53:22 -08:00
Kamran Khan
71ec2cf937 Return an error when the case isn't determined 2020-12-03 07:50:05 -08:00
Kamran Khan
943d7af503 Payload does not need to be an array 2020-12-02 23:43:35 -08:00
Kamran Khan
9fc1ac114d Reuse frame bytes for payload 2020-12-02 23:39:48 -08:00
Kamran Khan
524ebe3fce Prevent int overflow by casting before addition 2020-12-02 23:32:25 -08:00
Kamran Khan
1d8c103d9b Construct and return immutable instances of APDU instead of mutating one 2020-12-02 23:29:11 -08:00
Kamran Khan
0420ad8de6 Use constant for consistency 2020-12-02 23:06:24 -08:00
Kamran Khan
2c49718fee Lc3DataLe3 is not a valid case 2020-12-02 23:03:35 -08:00
Kamran Khan
b9ffe7e4ce Use constant instead of hardcoded integer 2020-12-02 23:02:07 -08:00
Kamran Khan
dc95310fc0 Clarify comments 2020-12-01 10:13:25 -08:00
Kamran Khan
94f548d5c5 Add extended APDU parser 2020-11-30 14:35:01 -08:00
Kamran Khan
5f5f72b6d1 Use arrayref for converting into ApduHeader 2020-11-30 02:04:52 -08:00
Mirna
fce91744c6 Addressing some of the requested changes 2020-11-13 22:06:27 +02:00
Mirna
58b5e4d8fa Add short APDUs parser 2020-11-13 09:32:59 +02:00