* 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
* 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
* Reworks the README
Takes over content from the archived 2.0 branch. Some of it will need
another update after forking off 2.1.
Fixes#391 and replaces #652.
* Rewording README
* New key wrapping API
Allows key wrapping to be different between persistent and server-side
storage.
To accomplish this, the PrivateKey now always stores the fully
reconstructed key, and has different methods to serialize it for the
respective use case.
* Cleans up legacy credential parsing
This is a backwards incompatible change. This PR already introduces
backwards incompatible new credential parsing, and therefore we can also
remove all other legacy parsing.
* Correct credential minimum size
* wider public interface to allow custom PrivateKey construction
Hopefully without breaking the others.
Summary of the changes:
- Device descriptor reports the device is bus powered and requires
100mA max.
- HID descriptor version bumped to 1.11 (was 1.10)
- Added string index for Interface and HID descriptors (which seems to
make OS X happy)
The alarm syscall is implemented in libtock-rs, but was duplicated here.
This removes the duplicated code and changes the references to point to
libtock-rs directly.
Co-authored-by: kaczmarczyck <43844792+kaczmarczyck@users.noreply.github.com>
We accidentally lost this check in #516. I refactored some of the
filters for better style.
The actual difference in logic is just one line in CTAP1 authenticate,
everything else is style, a test and the order in which we convert and
filter the credentials:
```
let credential_source = filter_listed_credential(credential_source, false)
.ok_or(Ctap1StatusCode::SW_WRONG_DATA)?;
```
* 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
* 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
This move changes the Env trait: It removes all functionality that is
used only in vendor commands (`FirmwareProtection`, `UpgradeStorage`)
and adds a function to call when parsing CBOR commands.
The abstraction necessary to test these commands is instead realized
through compile flags. The mock upgrade storage is active when compiled
for std for example.
* Replaces the Rng256 with RngCore from rand_core
The old trait was designed with our software crypto in mind. We should
use a more standard API going forward.
- Removes libraries/rng256/
- Ports libraries/crypto/ to rand_core
- Moves the used RNG trait to api/
* Use StdRng directy in TestEnv
* Removes redundant entries from Cargo.toml
This also fixes a compilation problem we have in debug mode with LTO
enabled.
* fix output-path triple dash
* Moves the AAGUID to Customization
* Removes the AAGUID from storage
The commit is optional on top of the Customization move. I didn't see
the point in storing the AAGUID in persistent storage anymore, so I
removed it.
The main benefit is that we removed all mentions of "tock" from all
source code that is not `main.rs` or inside `env/`.
This change makes libtock-drivers oblivious to how many endpoints are
supported. The endpoint is now checked a bit later in the stack.
* adds generic Env parameters
* adds Clock type to Env
* use new Clock
* TockTimer improvements
* new Clock interface
* addressed comments
* renames constants to milliseconds, other style fixes
* removes all cargo fmt artifacts