1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-05 14:59:44 +00:00
trezor-firmware/tests/fido_tests/u2f-tests-hid
2022-01-27 13:15:04 +01:00
..
.gitignore tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
dev.cc feat(common): Add INFO button to DebugLinkDecision. 2022-01-27 13:15:04 +01:00
dsa_sig.c tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
dsa_sig.h tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
hash-internal.h tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
hidapi-udp.c tests: update u2ftest to auto-confirm when needed 2019-09-14 14:36:33 +02:00
hidapi.h tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
HIDTest.cc tests/u2f-hid: Disable strict timing checks in HIDTest and increase receive timeout to avoid failures in CI when emulator is slow to respond. 2020-04-06 09:53:42 +02:00
LICENSE ci: enable editorconfig checks, fix whitespace issues 2020-11-11 14:43:50 +01:00
Makefile tests/fido2-tests: cleanup u2f-tests-hid 2019-09-13 12:47:28 +02:00
p256_ec.c tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
p256_ecdsa.c tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
p256_ecdsa.h tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
p256.c tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
p256.h tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
README tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
sha256.c tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
sha256.h tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
u2f_hid.h tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
u2f_util.cc tests/fido2-tests: cleanup u2f-tests-hid 2019-09-13 12:47:28 +02:00
u2f_util.h tests/fido2-tests: cleanup u2f-tests-hid 2019-09-13 12:47:28 +02:00
u2f.h tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00
U2FTest.cc tests/fido2-tests: cleanup u2f-tests-hid 2019-09-13 12:47:28 +02:00
UPSTREAM tests: add fido-tests/u2f-tests-hid 2019-09-12 17:50:17 +02:00

WHAT:
A couple of self-contained u2f HID device conformance tests:
HIDTest to check compliance at the usb HID communication layer.
U2FTest to check compliance at the application layer.

DEPENDENCIES:
git clone https://github.com/signal11/hidapi
git clone -b lollipop-release https://android.googlesource.com/platform/system/core

linux: sudo apt-get install libudev-dev

BUILD:
linux, mac: make

windows: nmake -f Makefile.win
  - if you have an old vc compiler, consider adding
    http://msinttypes.googlecode.com/svn/trunk/stdint.h
    or similar to your vc include directory.

RUN:
./list
  to find path of device to test (e.g. /dev/hidraw3)

./HIDTest $PATH [args]?
  to test low level communications with device.
  On windows?
  - Make sure to keep the quotes around the path.
  - Try https://github.com/adoxa/ansicon to get ANSI colors.
  On linux?
  - Make sure path is rw for your uid. Typically, a udev rule that adds
    rw for group plugdev goes a long way.

./U2FTest $PATH [args]?
  to test u2f application layer functionality of device.

Additional commandline arguments:
Add -a to continue execution after an error.
Add -p to pause after each error.
Add -v and -V to get more verbose output, down to the usb frames with -V.
Add -b to U2FTest in case fob under test is of the insert / remove
  class and does not have a user-presence button.