285 Commits

Author SHA1 Message Date
Mike Hommey
110b691ff1 Update memoffset to 0.8 2023-04-05 13:36:23 -07:00
Mike Hommey
4ae1bad6f6 Fix unaligned access warning with rustc 1.69 2023-04-05 13:35:50 -07:00
micolous
47d69204c5 Rename and document U2FAPDUHeader and fix Nc=0. (#191)
* Fixes an issue where Lc bytes would be included when Nc = 0 (zero command data length). This is incorrect in ISO 7816-4:2005 (which FIDO v1.1 and v1.2 correctly describe).

  This affected the `GetVersion` command; and tests have been updated accordingly.

* Renames `U2FAPDUHeader` to `CTAP1RequestAPDU`.

  Using the name "CTAP1" rather than "U2F" follows the convention put forward in FIDO v2.x specs, which avoids confusion like "U2Fv2" = "CTAP1".

  The previous implementation wasn't just "a header", but rather the complete APDU.

* Renames `FidoDevice::send_apdu` to `FidoDevice::send_ctap1`. This makes it more like `RequestCtap2`, and avoids confusion later on when adding support for CTAP2 over NFC (which still uses ISO 7816-4 APDUs).

* Documents and add tests for `CTAP1RequestAPDU`, explaining the confusing state of affairs.
2022-10-13 14:48:38 +02:00
Richard-Rogalski
ea43accf9c Add support for SPARC64 (#193)
* Add support for SPARC64
2022-10-13 14:43:17 +02:00
msirringhaus
b917bf3f59 Bump tokio to 1.17, which is current version in mozilla-central (#176)
Co-authored-by: Martin Sirringhaus <>
2022-06-20 12:59:38 +02:00
Dan Minor
c31cdd15b5 Update warp and tokio (#161)
This updates warp to 0.3.2 and tokio to 1.0. These libraries are only used for
testing. This update should help prevent duplicated copies of tokio when
vendoring into mozilla-central.
2022-06-20 12:46:24 +02:00
unrelentingtech
8611357319 Add device ping on open (from NetBSD) to FreeBSD (#175)
This prevents the annoying freezes in read().
2022-06-20 12:21:30 +02:00
R. Martinho Fernandes
abde4645a4 Use memoffset instead of homebrew offset_of (#171)
Co-authored-by: R. Martinho Fernandes <bugs@rmf.io>
2022-06-02 18:17:44 +02:00
Emilio Cobos Álvarez
b85bccf052 Update rand. (#164) 2022-05-19 18:22:42 +02:00
est31
d80400175f Fix panic msg is not a string literal warning (#149)
Fixes the non_fmt_panic warning.
2022-02-22 16:44:18 +01:00
Makoto Kato
35168459db Add riscv64 support (#152)
Thanks!
2022-01-20 14:33:28 +01:00
J.C. Jones
660a701b45 Ensure OpenBSD has use std::io (#140)
* Ensure OpenBSD has `use std::io`

Fix #139 and https://bugzilla.mozilla.org/show_bug.cgi?id=1666701

* Version bump 0.3.1
v0.3.1
2020-10-07 09:18:20 -07:00
J.C. Jones
5b27c97ce9 Rust 1.46 clippy fixes (#135)
* Fix linux unneeded extra

* Other clippy issues

* Review update

* Clippy for the webdriver feature, also enable in CI

* More clippy

* More clippy
2020-09-17 10:48:39 -07:00
J.C. Jones
026ce088b9 Fix webdriver tests on the rebase 2020-09-17 10:22:17 -07:00
J.C. Jones
7d732d75fe Rebase on v0.3.0 new errors, etc. 2020-09-17 10:22:17 -07:00
J.C. Jones
ec2d1bc5ed Review feedback 2020-09-17 10:22:17 -07:00
J.C. Jones
3a9a892099 Add all WebDriver methods to control TestToken 2020-09-17 10:22:17 -07:00
J.C. Jones
385b25d182 WebDriver implementation 2020-09-17 10:22:17 -07:00
J.C. Jones
38e640d45a Tagging v0.3.0
Major changes:
* Move to Rust 2018 edition #125
* Remove dependency on boxfnonce #121
* Reworked error handling #130
* Added a higher-level AuthenticatorService that can use multiple backends #123
* Changed the C API to use the new AuthenticatorService #123
* Added a Status channel for backends #122
* Now obtaining HID report sizes from the descriptors #112
* Add authenticator USB and Firmware details to the C API #93
v0.3.0
2020-09-10 13:25:51 -07:00
J.C. Jones
6f913a2cbb Review update 2020-09-10 13:24:37 -07:00
J.C. Jones
75179d6cfb Update all other platforms with the new error mechanism 2020-09-10 13:24:37 -07:00
J.C. Jones
5b475603b1 Better errors - only MacOS 2020-09-10 13:24:37 -07:00
J.C. Jones
1ebb134e71 Absorb status updates at the C API, rather than letting the channel error
Issue #132 will plumb the status channel through to the actual C API signatures.

Fixes #131
2020-09-10 10:34:25 -07:00
J.C. Jones
a73c504f31 Add a higher-level AuthenticatorService that can query multiple backends
- This moves the callback mechanism into its own file, as it gets more complex
- Reworks the C API to use the AuthenticatorService
2020-08-18 09:47:12 -07:00
J.C. Jones
51c576a2db Create status channel for MacOS 2020-08-10 14:58:49 -07:00