41 Commits

Author SHA1 Message Date
kaczmarczyck
c160b034ef Latest compiler and package versions (#663)
* Move to latest compiler and package versions

We also add cargo audit to the desktop tests.

* Install cargo audit differently in workflow

* Removes leftover nightly references

* Removes install check from deploy.py

The toolchain should be correctly setup after setup.sh.

* Removes rust component install from workflow

Now that the nightly version is fixed, this should work ootb.

* Moves cargo audit install to setup.sh

* Updates cargo bloat workflow to default features
2023-11-09 15:00:37 +01:00
kaczmarczyck
e5ba9db644 Reworks workflows into script (#661)
* Reworks some workflows to run a script instead

Advantages are:
- Only one set of tests needs maintenance.
- Local results match workflows, no surprises.
- Reduced reliance on GitHub actions.

Fixes #50, #168, #169, #171, #507

* Adds macos to the test matrix
2023-11-08 17:24:15 +01:00
kaczmarczyck
778102712f venv for Python setup (#653)
* Python uses venv

* Small fixes to python calls
2023-11-07 05:13:21 +01:00
kaczmarczyck
6fb7e194eb Compile flag for AuthenticatorConfig (#628)
* Adds a compile flag for AuthenticatorConfig

The command can be disabled for authenticators that don't want users to
change their configuration.

* adds tool for calling Config

* std now implies config_command

* removes obsolete comment
2023-05-08 15:45:32 +02:00
kaczmarczyck
645c1ba3a7 Vendor Command + HID fix (#618)
* Fixes CBOR message passing through Vendor HID

I did all my tests on hardware with this fix, and now I'm surprised that
it didn't end up on develop. So should have been part of a former PR.

* vendor channel test

* forward vendor HID correctly for upgrades

* fixes cargo fmt

* removes script and updates documentation to match
2023-04-26 14:59:22 +02:00
kaczmarczyck
8733d6585f Version string for CTAP 2.1 (#590)
* new version string for 2.1

* fixes new Python linter problems
2023-02-08 09:20:59 +01:00
kaczmarczyck
6610a29a67 Fixed proc-macro2 version (#550)
* fixes proc-macro2 in dependencies

* adds missing locked versions, and a verbose print for cargo check

* commits Cargo.lock files

* removes unnecessary Cargo.lock entries

* adds missing Cargo.lock
2022-09-27 10:12:45 +02:00
kaczmarczyck
d6994e3bc3 New Upgrade Interface (#543)
* includes metadata inside partition, introduces the partition helper

* style improvements
2022-09-13 10:06:58 +02:00
kaczmarczyck
8288bb0860 Firmware version for upgrades (#542)
* shows and checks the firmware version

* merges metadata ranges in boards

* simplifies locations loop
2022-09-01 18:28:03 +02:00
kaczmarczyck
598c21071e New metadata format (#539)
* new metadata format is used

* Update bootloader/src/main.rs

Co-authored-by: ztoked <zhalvorsen@google.com>

* splits the metadata signed and unsigned parts evenly

* fixes pylint

Co-authored-by: ztoked <zhalvorsen@google.com>
2022-08-31 14:35:45 +02:00
kaczmarczyck
01cc8333e5 Tool fixes (#537)
* private key type is str, some fixes

* catches file exceptions for private key

* adds exception type

* adds exception message
2022-08-29 11:00:31 +02:00
kaczmarczyck
4442998b64 Vendor HID for upgrades (#529)
* vendor-hid for upgrades

* empty argument fix

* same vendor-hid usage in both deploys

* forgot one board

* aaand also forgot the quotes
2022-08-17 10:29:26 +02:00
Julien Cretin
d3e01d22fb Duplicate the credential management command as a vendor command (#527)
* Duplicate the credential management command as a vendor command

This permits to work with libfido2 and thus ssh-add. Fix #526.

* fix deploy_partition script
2022-08-13 06:27:31 +02:00
Liam Murphy
f07be7f2ac Tweak: use the Usage page const, not an immediate (#525)
Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2022-08-08 16:23:19 +02:00
Liam Murphy
262e505ef7 Support configure via the Vendor interface (#524)
* Support configure via the Vendor interface

* Adjust tests now that GetInfo is supported on vendor_hid

* Add test for vendor_hid not supporting FIDO command
2022-08-08 13:54:46 +02:00
Liam Murphy
4a2217f025 Interleave sending and receiving of packets to reduce rx latency (#515)
* Interleave sending and receiving of packets to reduce latency in receiving of packets

* Add patch to CtapUsbSyscallDriver

* Minor tweaks from review

* Log when overwritting an existing reply

* Only log when 'debug_ctap' is enabled

* Make ctap mod public, as per review

* Rename send_or_recv to send_and_maybe_recv

* fix typo

* Don't process packets on other transport while doing keepalive

* Don't process packets on other transport while doing keepalive

* More accurately determine if reply has finished

* Move comment closer to appropriate location

* Add tests for canceling keepalive packets

* Added a TODO for kaczmarczyck re ctap module being public

* remove the unnecessary sleep()s

* undo messed up commit

* address pylint warnings

* Fix merge mess up, and patch fido2 Usage Page

* Fix up completely borked merge

* Remove patch to FIDO usage, after #523.

* remove obsolete aspects to diff

Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
2022-08-04 14:54:22 +02:00
Liam Murphy
6276904a42 Fix user presence by not overwriting error with OK() (#521)
* Fix user presence by not overwriting error with OK()

* revert debugging change to TOUCH_TIMEOUT_MS

* fix up incomplete merge

* rename variable to more understandable name

* Add tests to test user_presence
2022-08-02 11:38:02 +02:00
Liam Murphy
253d27d612 Add tests to demonstrate broken user presence timeouts (#520)
* Add tests to demonstrate broken user presence timeouts

* fix up some formatting

* apply auto-formatting
2022-08-01 09:13:14 +02:00
Liam Murphy
168de290de Add test script to verify Vendor HID interface (#503)
* Add test script to verify Vendor HID interface

* fix formatting

* fix formatting

* fix formatting

* fix formatting

* duplicate tests to test both interfaces first and second

* simplifiy using unique byte val

* more tests

* fix up tings from review

* reset rx packets after reading.

* fix formatting.
2022-07-20 12:27:07 +02:00
kaczmarczyck
92e1d51442 Fix libfido in configure (#499)
* fix capitalization of Ctap2 in configure

* changes setup to match new libfido2 version
2022-06-13 13:46:15 +02:00
Jean-Michel Picod
15233dba3e Fix pylint configuration, script and matcher (#491)
* Fix pylint configuration, script and matcher

* Makes yapf happy

* Fix one-liner docstring

* Fix one-liner docstring
2022-06-07 20:39:22 +02:00
Bubun Das
81996f650e OpenSSL x509 version changed to v3 (#456) 2022-04-11 15:04:27 +02:00
kaczmarczyck
5cf988c7fa allows silent certificate checks (#410) 2021-11-18 17:09:40 +01:00
kaczmarczyck
32da73772f Upgrade tooling (#400)
* upgrade tooling

* adds condition on nrfjprog
2021-11-04 16:31:37 +01:00
Liam Murphy
44988695ab Report error when no devices found to configure. (#398) 2021-11-01 09:51:55 +01:00
Fabian Kaczmarczyck
31df2ca45e use f-strings and test with 3.9 2021-09-17 14:12:58 +02:00
kaczmarczyck
596b47886c Upgrade signing key generation (#379)
* adds the upgrade signing key generation and the partition offset

* use openssl in build.rs instead
2021-09-15 21:25:19 +02:00
Jean-Michel Picod
7c8894bb04 Compare all timestamps using UTC timezone (#308) 2021-04-15 17:22:38 +02:00
Jean-Michel Picod
958d7a29dc Fix config.py tool according to the new API of fido2 python package (#284)
* Fix fido2 API update.

Since fido2 0.8.1 the device descriptor moved to NamedTuple, breaking
our configuration tool.
Code is now updated accordingly and the setup script ensure we're
using the correct version for fido2 package.

* Make Yapf happy

* Fix missing update for fido2 0.9.1

Also split the comment into 2 lines so that the touch is not hidden
at the end of the screen.
2021-02-11 17:44:49 +01:00
Jean-Michel Picod
7213c4ee99 Address first round of comments. 2020-12-16 18:22:15 +01:00
Jean-Michel Picod
e35c41578e Add configuration tool 2020-12-16 18:22:15 +01:00
Jean-Michel Picod
34f3483f9e Decoralate AAGUID and certificates 2020-09-14 14:03:57 +02:00
Guillaume Endignoux
31a8996ea5 Add tests for heapviz tool. 2020-06-26 11:05:45 +02:00
Guillaume Endignoux
85f759f912 Add CLI parameters and wait for ENTER to start visualization. 2020-06-26 10:45:53 +02:00
Guillaume Endignoux
75836d459a Address review comments. 2020-06-25 18:18:21 +02:00
Guillaume Endignoux
e457efc4d6 Add a heap visualization tool. 2020-06-25 15:46:08 +02:00
Jean-Michel Picod
9de3817ade Add missing license header 2020-02-28 15:57:48 +01:00
Jean-Michel Picod
19056abbf3 Replace custom action by shell script 2020-02-28 15:52:09 +01:00
Jean-Michel Picod
7d421d3ae0 Replace shell script with a python3 script.
Updated the shell script that generates the certificates and the
documentation accordingly.
Caveat: now installation is a 2-step procedure, installing OS and
application are split into 2 commands.
2020-02-19 11:34:43 +01:00
Jean-Michel Picod
fdbfb1be2a Change the way private key and cert are embedded.
OpenSSL seems to serialize bigints as signed value, which means the ECC
key may end up being 33 bytes instead of the 32 bytes we're expecting,
causing build to fail.
The shell script extraction is now replaced by a build.rs script that
uses OpenSSL to extract the content and do sanity checks.
Forcing generating cryptographic materials now always generate a key and
a certificate (useful to compile/flash multiple keys without them being
considered as clones). The self-signed CA is left untouched.
2020-02-05 18:48:28 +01:00
Jean-Michel Picod
f91d2fd3db Initial commit 2020-01-30 11:47:29 +01:00