Commit Graph

14 Commits

Author SHA1 Message Date
Pol Henarejos
a9eee861fe Adding support for chained apdu in emulation mode.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-01-17 00:06:17 +01:00
Pol Henarejos
4919eb980f Added a major refactoring to include Emulated interface.
It works in combination with virtualsmarcard module (vpcd). It properly installed, it creates a virtual reader that can be interfaced via PCSC+vcpd. At user app level, it has no difference of having a physical smart card.

At this moment, it only works emulating a CCID interface.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-01-09 18:06:21 +01:00
Pol Henarejos
c0a540ae2b Fix processing APDU when no app is selected.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-12-24 01:37:04 +01:00
Pol Henarejos
7deaa990d3 An app can be selected even if there is another selected previously.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-12-24 00:49:25 +01:00
Pol Henarejos
4682e5821f Selecting an app by AID requires the AID as argument.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-12-22 19:33:02 +01:00
Pol Henarejos
e5825df5cb Added capability to add multiple interfaces: HID and CCID at compile time.
Depending on compiling flags, HID and/or CCID may be enabled independently and run simultaneously.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-12-20 23:41:24 +01:00
Pol Henarejos
c4178fda4b Fix when multiple shutdowns are sent
Thread queues are empty on every start to avoid ancient messages from previous sessions.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-11-24 20:21:06 +01:00
Pol Henarejos
74210d7af0 Fix chaining more than 2 chunks.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-10-30 23:41:56 +01:00
Pol Henarejos
c5095dfec6 Only send response apdu if sw != 0.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-09-27 22:10:47 +02:00
Pol Henarejos
3092da23ed card_init_core1() shall be called from every thread launched on core1.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-09-22 19:24:07 +02:00
Pol Henarejos
8b97791d8f Reorganizing core0/core1 split.
Now CBOR and APDU (i.e., intensive processing) areas are executed on core1, while core0 is dedicated for hardware tasks (usb, button, led, etc.).
2022-09-20 14:39:59 +02:00
Pol Henarejos
214ec2b9ae Adding support for U2F_MSG 2022-09-02 18:02:31 +02:00
Pol Henarejos
b42e2b5493 Fix processing apdu. 2022-08-30 16:57:01 +02:00
Pol Henarejos
40288a85f1 It's a major reorganization.
In order to add FIDO2 support, we need to reorganize some USB/CCID calls to specific area (named driver).
Thus, pico-hsm-sdk has two drivers:
- CCID driver implements APDU over USB/CCID ISO-7816 standard procedures.
- HID driver implements APDU over HID.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-08-30 02:00:11 +02:00