Commit Graph

78 Commits

Author SHA1 Message Date
Pol Henarejos
d590a21738 Refactor OTP to add more platforms.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-05-13 20:16:49 +02:00
Pol Henarejos
b4813e9db2 Fix build
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-05-01 12:59:36 +02:00
Pol Henarejos
707cdf7bf4 Fix windows build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-04-29 15:36:53 +02:00
Pol Henarejos
e24eb9b150 More renames.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-04-21 00:06:28 +02:00
Pol Henarejos
50bb75bdd6 Fix interface iStrings.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-04-20 23:49:31 +02:00
Pol Henarejos
26de18608f A refactor.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-04-20 17:34:42 +02:00
Pol Henarejos
f8cbb145f4 Add multicore to LWIP.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-04-18 16:37:30 +02:00
Pol Henarejos
f84b6bed93 Add a tiny REST server. 2026-04-10 20:40:05 +02:00
Pol Henarejos
8e6c6c1fcc Apply strict build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-03-08 19:27:23 +01:00
Pol Henarejos
4cd437ed35 Fix strict non-prototype declaration warn.
Fixes #22.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-03-07 17:12:40 +01:00
Pol Henarejos
2cd21f7dd2 Add weak init callback.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-01-29 16:11:12 +01:00
Pol Henarejos
860f77a45b Move rtc
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-01-24 01:15:10 +01:00
Pol Henarejos
8412727e03 Rename methods for better description
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-01-22 11:22:37 +01:00
Pol Henarejos
7de98552d1 Fix button logic.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-01-05 19:39:35 +01:00
Pol Henarejos
08dc94a144 Disable button press by default since LED may not be properly configured until it is commissioned.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-01-05 19:37:18 +01:00
Pol Henarejos
7583ecff18 Fix applet cmp
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-12-09 19:15:22 +01:00
Pol Henarejos
2d72a157d5 Fix on AID selection. It should support shorter AID if matches.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-12-01 01:44:29 +01:00
Pol Henarejos
ed848d005f Fix curious bug when FIDO+OpenPGP+CCID connection is used in some circumstances.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-11-15 21:12:47 +01:00
Pol Henarejos
8f907b25ba Relicense project under the GNU Affero General Public License v3 (AGPLv3)
and add the Enterprise / Commercial licensing option.

Main changes:
- Replace GPLv3 headers with AGPLv3 headers in source files.
- Update LICENSE file to the full AGPLv3 text.
- Add ENTERPRISE.md describing the dual-licensing model:
  * Community Edition: AGPLv3 (strong copyleft, including network use).
  * Enterprise / Commercial Edition: proprietary license for production /
    multi-user / OEM use without the obligation to disclose derivative code.
- Update README with a new "License and Commercial Use" section pointing to
  ENTERPRISE.md and clarifying how companies can obtain a commercial license.

Why this change:
- AGPLv3 ensures that modified versions offered as a service or deployed
  in production environments must provide corresponding source code.
- The Enterprise / Commercial edition provides organizations with an
  alternative proprietary license that allows internal, large-scale, or OEM
  use (bulk provisioning, policy enforcement, inventory / revocation,
  custom attestation, signed builds) without AGPL disclosure obligations.

This commit formally marks the first release that is dual-licensed:
AGPLv3 for the Community Edition and a proprietary commercial license
for Enterprise customers.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-26 20:06:16 +01:00
Pol Henarejos
233e6594c6 Add casts to fix warnings.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-12 18:52:07 +02:00
Pol Henarejos
0ddfdf8134 Add sanity check.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-07 21:11:28 +02:00
Pol Henarejos
031d76737b Add pico_serial_hash as a source of unique (almost) 32 bytes string.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-07 21:11:06 +02:00
Pol Henarejos
4edc506759 Fix build for non-pico boards.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-22 23:35:46 +02:00
Pol Henarejos
eb75ad4efa Add app_exists() to check if an AID is loaded. 2025-05-25 19:07:20 +02:00
Pol Henarejos
f18f761234 Restore led mode when finishing button press.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-19 01:19:17 +01:00
Pol Henarejos
2c3fe5bebf Only pin to core in ESP32-S3 since it is multicore.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-07 19:35:13 +01:00
Pol Henarejos
9e9632f297 Fix commissioned values for LED.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-02-23 00:49:45 +01:00
Pol Henarejos
c59fb91540 Set stack size depending on the number of enabled interfaces.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-12-24 01:42:33 +01:00
Pol Henarejos
585a6d77e3 Use USB product field in the descriptor.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-12-17 16:27:11 +01:00
Pol Henarejos
812f075ee4 Add UP button timeout to PHY.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-11-25 12:57:17 +01:00
Pol Henarejos
3dbf969e12 WCID interface is always enabled.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-11-06 17:02:38 +01:00
Pol Henarejos
6625678c30 Rename CCID_ codes to PICOKEY_
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-11-05 18:21:24 +01:00
Pol Henarejos
5399149b9d Increase number of hosted apps to 8.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-11-05 18:03:00 +01:00
Pol Henarejos
27a685b931 Fix usb initialization for emulation.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-11-05 09:42:27 +01:00
Pol Henarejos
0638409ff8 Refactor PHY to support more flexible and scalable architecture.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-11-05 00:29:13 +01:00
Benoît Allard
7a0b67f3cb led: Rename 'blink' to 'mode' 2024-09-25 21:46:33 +02:00
Pol Henarejos
108cfec47c Enable OTP to store a permanent secret key.
It can be used by HSM or Fido to protect the keys and use it as MKEK.
2024-09-11 23:16:23 +02:00
Pol Henarejos
ea6303de81 Add new led module to use colors whenever is possible.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-09-03 18:07:37 +02:00
Pol Henarejos
20099b61e8 Fix ESP32 GPIO led no.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-09-02 17:28:18 +02:00
Pol Henarejos
9f65a2cfa0 Fix BOOT press with RP2350.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-09-02 09:48:04 +02:00
Pol Henarejos
2d6545f191 Add support to RP2350.
RP2350 does not support RTC, so we use AON timer instead.
2024-08-28 16:42:46 +02:00
Pol Henarejos
7a88a2b8e7 Improved multicore synchronization. Now they exchange signals and protect areas atomically.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-23 19:24:18 +02:00
Pol Henarejos
65fea84df1 Fix warnings.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-23 13:17:10 +02:00
Pol Henarejos
fa6292118d Major refactor of USB CCID and USB HID interfaces. All interfaces are rewritten.
With this new scheme we ensure that:
- memcpy's are reduced.
- no race conditions are performed.
- critical areas are protected.
- callbacks are executed immediately.
- write's are executed after the positive report is received.
- no usb middle interface anymore.
- CCID and HID are totally independent.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-23 10:02:19 +02:00
Pol Henarejos
38f0e2cc3a select_app now invokes U2F or FIDO depending on the message.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-20 14:29:11 +02:00
Pol Henarejos
c1571c02f8 Increase vStack depending on the number of interfaces.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-20 12:43:01 +02:00
Pol Henarejos
b3dbee5cd6 Increase vStack of core0 of ESP32.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-18 23:43:54 +02:00
Pol Henarejos
246ed5cf19 Fix when setting options and taking VIDPID values.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-06-21 22:07:28 +02:00
Pol Henarejos
218441a45a Added support for enable/disable Web CCID on the fly.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-06-19 23:28:55 +02:00
Pol Henarejos
a0e55ebfae Fix tusb initialization.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-06-19 22:30:07 +02:00