Commit Graph

25 Commits

Author SHA1 Message Date
Pol Henarejos
41b1467ab7 Fix with empty extended length header.
Fix buffer overflow when extended length. APDU shall be reset at every APDU beginning.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-02-23 12:00:04 +01:00
Pol Henarejos
87a47c626b Fix with extended LE.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-02-21 13:26:30 +01:00
Pol Henarejos
eaa0265f74 Adding import dkek shares.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-02-18 15:46:46 +01:00
Pol Henarejos
1630c7b52d Adding unique_id variable.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-02-18 10:39:03 +01:00
Pol Henarejos
0017284103 Starting migration from gnuk to own solution.
gnuk/openpgp will be left as another pkcs15 app.
Lots of work has been done in the meanwhile.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-02-13 01:17:14 +01:00
Pol Henarejos
af1280ca0b Fix with extended APDU
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-02-03 15:35:09 +01:00
Pol Henarejos
f7c2c0afaa Adding support for extended APDU.
Added SC-HSM ATR

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-02-03 11:26:31 +01:00
Pol Henarejos
90ee12ed96 Fix a bug where multiple incoming APDU may come
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-24 18:02:05 +01:00
Pol Henarejos
b6eaac895d Reducing the timeout to be catched by the host
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-19 01:16:24 +01:00
Pol Henarejos
189c095f1f Flash procedures shall be called from core 0.
We created an exclusive mechanism to share cached pages to write onto flash.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-18 00:17:43 +01:00
Pol Henarejos
702b8ee4ff Added neug task to main loop.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-14 23:44:23 +01:00
Pol Henarejos
9eaf877fe2 Playing with RNG. It seems to work. Needs further testing
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-10 18:08:32 +01:00
Pol Henarejos
240dc07fa5 Reducing debug level.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 23:52:46 +01:00
Pol Henarejos
f6a71c0689 Lots of fixes. At this moment flow between host-device works smoothly. opensc-tool -an needs further debug.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 22:36:26 +01:00
Pol Henarejos
fd93f4779e Adding openpgp support.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 02:03:12 +01:00
Pol Henarejos
0445f587f7 Lots of fixes. At this time, the RP2040 is detected by opensc-tool -l. However, it sends continuously slot status.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-02 21:37:55 +01:00
Pol Henarejos
9229b4b3d3 itf passed to vendord_open is larger than tusb_desc_interface.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-02 19:30:08 +01:00
Pol Henarejos
b217740e58 - Adding the rest of Gnuk USB/CCID methods.
- It runs the openpgp thread in the other core (core1) and leaves the main program/ccid/usb methods running in the core 0.
- At this moment it does not call openpgp_thread.
- Compiles but it needs further debug
2022-01-02 00:51:54 +01:00
Pol Henarejos
3169139d3d Adding a hack to prepare vendor open 2022-01-01 13:12:50 +01:00
Pol Henarejos
b69232dd55 Adding notify_slot_change 2022-01-01 13:10:58 +01:00
Pol Henarejos
366d59cbfa Starting to port GnuK 2022-01-01 12:57:53 +01:00
Pol Henarejos
0dfd5d29f3 Using vendor driver as background layout. However, it does not work since vendor_open() checks that the interface class equals to vendor_class. It must be bypassed somehow.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2021-12-31 03:49:29 +01:00
Pol Henarejos
0e67eaf659 Adding CCID driver
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2021-12-31 02:17:09 +01:00
Pol Henarejos
c8a2912616 Moving to TinyUSB. Low level API does not provide methods for larger packets. TinyUSB provides a complete interface for managing CCID.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2021-12-30 23:35:30 +01:00
Pol Henarejos
7785c8ff1c First commit. Attempting to emulate a CCID device. Not easy with RP2040
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2021-12-30 00:31:01 +01:00