Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIDO2 support in RIOT #16489

Merged
merged 1 commit into from
Sep 8, 2021
Merged

FIDO2 support in RIOT #16489

merged 1 commit into from
Sep 8, 2021

Conversation

Ollrogge
Copy link
Contributor

Contribution description

This PR adds support for the Fast Identity Online 2 (FIDO2) specification in RIOT. FIDO2 is an authentication standard that seeks to solve the password problem by enabling passwordless authentication. FIDO2 consists of the W3C Web Authentication specification (WebAuthn) and the Client to Authenticator Protocol (CTAP).

This PR adds a basic implementation of the CTAP protocol. CTAP is an application layer protocol for the communication between an authenticator and host. Most of the time an authenticator is either a mobile device or security key like YubiKey.

As of now not many websites support the passwordless login flow added by the second version of the FIDO standard. Therefore future PR's will add the backward compatibility to FIDO1 in order to enable the usage of this implementation as part of 2FA authentication flows.

Testing procedure

  • tests/sys_fido2_ctap

Issues/PRs references

@github-actions github-actions bot added Area: build system Area: Build system Area: pkg Area: External package ports Area: sys Area: System Area: tests Area: tests and testing framework labels May 21, 2021
@leandrolanzieri leandrolanzieri added Area: security Area: Security-related libraries and subsystems Type: new feature The issue requests / The PR implemements a new feature for RIOT labels May 21, 2021
@emmanuelsearch
Copy link
Member

thanks @Ollrogge for this nice contribution!
Without having looked at the code too closely yet,
I have a quick (customary) question:
what is the main reasoning which motivates the use of your fork
instead of using the origin repo for the pkg?

@Ollrogge
Copy link
Contributor Author

thanks @Ollrogge for this nice contribution!
Without having looked at the code too closely yet,
I have a quick (customary) question:
what is the main reasoning which motivates the use of your fork
instead of using the origin repo for the pkg?

My implementation doesn't support all the features yet that the solokeys testcases test.
Therefore I disabled some modules for now.

Copy link
Member

@PeterKietzmann PeterKietzmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First set of questions and comments

pkg/fido2_tests/Makefile Outdated Show resolved Hide resolved
pkg/fido2_tests/Makefile Show resolved Hide resolved
sys/Makefile.dep Outdated Show resolved Hide resolved
sys/fido2/Kconfig Outdated Show resolved Hide resolved
sys/fido2/Makefile Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap.c Show resolved Hide resolved
sys/fido2/ctap/ctap.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap.c Show resolved Hide resolved
sys/fido2/ctap/ctap.c Show resolved Hide resolved
Copy link
Member

@PeterKietzmann PeterKietzmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second intermediate blob of comments and questions

sys/fido2/ctap/ctap.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap_crypto.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap_crypto.c Show resolved Hide resolved
sys/fido2/ctap/ctap_crypto.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap_mem.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap_utils.c Show resolved Hide resolved
Copy link
Member

@PeterKietzmann PeterKietzmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

third blob of comments and questions

sys/fido2/ctap/transport/ctap_transport.c Outdated Show resolved Hide resolved
sys/include/fido2/ctap/transport/ctap_transport.h Outdated Show resolved Hide resolved
sys/include/fido2/ctap/transport/ctap_transport.h Outdated Show resolved Hide resolved
sys/include/fido2/ctap/transport/ctap_transport.h Outdated Show resolved Hide resolved
sys/include/fido2/ctap/transport/ctap_transport.h Outdated Show resolved Hide resolved
sys/include/fido2/ctap.h Outdated Show resolved Hide resolved
sys/include/fido2/ctap/ctap_crypto.h Outdated Show resolved Hide resolved
sys/include/fido2/ctap/ctap_crypto.h Outdated Show resolved Hide resolved
sys/include/fido2/ctap/transport/hid/ctap_transport_hid.h Outdated Show resolved Hide resolved
tests/sys_fido2_ctap/main.c Show resolved Hide resolved
@PeterKietzmann
Copy link
Member

Initial testing:

  1. Registration and login works with webauthn.io (using chrome)
    Bildschirmfoto_2021-05-26_16-40-00
    Bildschirmfoto_2021-05-26_16-41-02

  2. make fido2-tests fails 24 tests (succeeds 27 👍 ) but IIRC this relates to python version issues. @Ollrogge can you have a look at

this output
...

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f079fd943d0>, packet = [255, 255, 255, 255, 129, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
================================================================== short test summary info ===================================================================
FAILED tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_eddsa - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/test_reset.py::test_reset - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_set_pin - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_set_pin_too_big - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_get_pin_token_but_no_pin_set - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_change_pin_but_no_pin_set - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_setting_pin_and_get_info - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_long_ping - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_init - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_ping - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_wink - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_cbor_no_payload - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_no_data_in_u2f_msg - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_invalid_hid_cmd - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_oversize_packet - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_skip_sequence_number - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_resync_and_ping - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_ping_abort - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_timeout - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_not_cont - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_check_busy - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_check_busy_interleaved - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_cid_0 - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_cid_ffffffff - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_get_assertion.py::TestGetAssertionAfterBoot::test_assertion_after_reboot - ModuleNotFoundError: No module named 'smartcard'
ERROR tests/standard/fido2/test_getinfo.py::test_get_info - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_getinfo.py::test_get_info_version - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_getinfo.py::test_Check_pin_protocols_field - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_getinfo.py::test_Check_options_field - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_getinfo.py::test_Check_uv_option - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_getinfo.py::test_Check_up_option - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_make_credential - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_attestation_format - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_authdata_length - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_cdh - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_cdh - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_user - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_user - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_rp - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_rp - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_pubKeyCredParams - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_excludeList - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_extensions - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_options - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_rp_name - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_rp_id - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_rp_icon - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_user_name - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_user_id - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_user_displayName - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_user_icon - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_pubKeyCredParams - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_pubKeyCredParams_type - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_pubKeyCredParams_alg - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_pubKeyCredParams_alg - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_unsupported_algorithm - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_exclude_list - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_exclude_list2 - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_exclude_list - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_exclude_list_type - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_exclude_list_id - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_exclude_list_id - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_exclude_list_type - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_exclude_list_excluded - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_unknown_option - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_reset_credential.py::test_credential_resets - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_resident_key[] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_resident_key_auth[] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_user_info_returned[] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_multiple_rk_nodisplay[] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_rk_maximum_size_nodisplay[] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_resident_key[123456] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_resident_key_auth[123456] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_user_info_returned[123456] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_multiple_rk_nodisplay[123456] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_rk_maximum_size_nodisplay[123456] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_lockout.py::test_lockout - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_get_key_agreement_fields[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_verify_flag[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_change_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_get_no_pin_auth[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_zero_length_pin_auth[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_make_credential_no_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_get_assertion_no_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::test_pin_attempts[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_send_zero_length_pin_auth - OSError: [Errno 19] No such device
=================================================== 24 failed, 27 passed, 14 skipped, 63 errors in 16.15s ====================================================
make[1]: *** [Makefile:30: run] Fehler 1
make: *** [Makefile:20: fido2-test] Fehler 2

@Ollrogge
Copy link
Contributor Author

2. `make fido2-tests` fails 24 tests (succeeds 27  +1 ) but IIRC this relates to python version issues. @Ollrogge can you have a look at

this output

...

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f079fd943d0>, packet = [255, 255, 255, 255, 129, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
================================================================== short test summary info ===================================================================
FAILED tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_eddsa - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/test_reset.py::test_reset - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_set_pin - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_set_pin_too_big - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_get_pin_token_but_no_pin_set - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_change_pin_but_no_pin_set - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_setting_pin_and_get_info - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_long_ping - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_init - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_ping - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_wink - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_cbor_no_payload - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_no_data_in_u2f_msg - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_invalid_hid_cmd - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_oversize_packet - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_skip_sequence_number - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_resync_and_ping - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_ping_abort - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_timeout - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_not_cont - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_check_busy - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_check_busy_interleaved - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_cid_0 - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_cid_ffffffff - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_get_assertion.py::TestGetAssertionAfterBoot::test_assertion_after_reboot - ModuleNotFoundError: No module named 'smartcard'
ERROR tests/standard/fido2/test_getinfo.py::test_get_info - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_getinfo.py::test_get_info_version - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_getinfo.py::test_Check_pin_protocols_field - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_getinfo.py::test_Check_options_field - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_getinfo.py::test_Check_uv_option - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_getinfo.py::test_Check_up_option - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_make_credential - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_attestation_format - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_authdata_length - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_cdh - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_cdh - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_user - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_user - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_rp - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_rp - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_pubKeyCredParams - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_excludeList - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_extensions - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_options - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_rp_name - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_rp_id - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_rp_icon - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_user_name - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_user_id - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_user_displayName - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_user_icon - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_pubKeyCredParams - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_pubKeyCredParams_type - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_pubKeyCredParams_alg - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_pubKeyCredParams_alg - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_unsupported_algorithm - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_exclude_list - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_exclude_list2 - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_exclude_list - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_exclude_list_type - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_missing_exclude_list_id - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_exclude_list_id - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_bad_type_exclude_list_type - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_exclude_list_excluded - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_make_credential.py::TestMakeCredential::test_unknown_option - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_reset_credential.py::test_credential_resets - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_resident_key[] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_resident_key_auth[] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_user_info_returned[] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_multiple_rk_nodisplay[] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_rk_maximum_size_nodisplay[] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_resident_key[123456] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_resident_key_auth[123456] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_user_info_returned[123456] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_multiple_rk_nodisplay[123456] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/test_resident_key.py::TestResidentKey::test_rk_maximum_size_nodisplay[123456] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_lockout.py::test_lockout - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_get_key_agreement_fields[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_verify_flag[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_change_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_get_no_pin_auth[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_zero_length_pin_auth[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_make_credential_no_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_get_assertion_no_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::test_pin_attempts[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_send_zero_length_pin_auth - OSError: [Errno 19] No such device
=================================================== 24 failed, 27 passed, 14 skipped, 63 errors in 16.15s ====================================================
make[1]: *** [Makefile:30: run] Fehler 1
make: *** [Makefile:20: fido2-test] Fehler 2

I only ever got this error when I didn't wait long enough before pressing enter after a device reboot. The connection between authenticator and host has not been reestablished yet, therefore no device can be found. Could you run the tests again and wait a little longer after a reboot ?

@PeterKietzmann
Copy link
Member

Okay, much better! I waited ~10 seconds now after each reboot. One failure remaining, can you check:

this output
========================================================================== FAILURES ==========================================================================
________________________________________________________________________ test_lockout ________________________________________________________________________

device = <tests.conftest.TestDevice object at 0x7fe1c9cc9760>, resetDevice = <tests.conftest.TestDevice object at 0x7fe1c9cc9760>

    @pytest.mark.skipif('trezor' in sys.argv, reason="ClientPin is not supported on Trezor.")
    def test_lockout(device, resetDevice):
        pin = "TestPin"
        device.client.pin_protocol.set_pin(pin)
    
        pin_token = device.client.pin_protocol.get_pin_token(pin)
        req = FidoRequest(pin_token=pin_token)
    
        req.pin_auth = hmac_sha256(pin_token, req.cdh)[:16]
    
        for i in range(1, 10):
            err = CtapError.ERR.PIN_INVALID
            if i in (3, 6):
                err = CtapError.ERR.PIN_AUTH_BLOCKED
            elif i >= 8:
                err = [CtapError.ERR.PIN_BLOCKED, CtapError.ERR.PIN_INVALID]
    
            with pytest.raises(CtapError) as e:
                device.sendPP("WrongPin")
            assert e.value.code == err or e.value.code in err
    
            attempts = 8 - i
            if i > 8:
                attempts = 0
    
            res = device.ctap2.client_pin(1, PinProtocolV1.CMD.GET_RETRIES)
            assert res[3] == attempts
    
            if err == CtapError.ERR.PIN_AUTH_BLOCKED:
                device.reboot()
    
        with pytest.raises(CtapError) as e:
>           device.sendMC(*req.toMC())

tests/standard/fido2/pin/test_lockout.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/conftest.py:315: in sendMC
    attestation_object = self.ctap2.make_credential(*args, **kwargs)
venv/lib/python3.8/site-packages/fido2/ctap2.py:690: in make_credential
    return self.send_cbor(
venv/lib/python3.8/site-packages/fido2/ctap2.py:650: in send_cbor
    expected = cbor.encode(cbor.decode(enc))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

data = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

    def decode(data):
        value, rest = decode_from(data)
        if rest != b"":
>           raise ValueError("Extraneous data")
E           ValueError: Extraneous data

venv/lib/python3.8/site-packages/fido2/cbor.py:173: ValueError
================================================================== short test summary info ===================================================================
FAILED tests/standard/fido2/pin/test_lockout.py::test_lockout - ValueError: Extraneous data
==================================================== 1 failed, 113 passed, 14 skipped in 94.99s (0:01:34) ====================================================

@github-actions github-actions bot added Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration labels Jun 4, 2021
@Ollrogge
Copy link
Contributor Author

Ollrogge commented Jun 4, 2021

Okay, much better! I waited ~10 seconds now after each reboot. One failure remaining, can you check:
this output

I also get this error. This one originates in the USB layer I think. I have not yet been able to fix this one.

@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 22, 2021
Copy link
Member

@PeterKietzmann PeterKietzmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ollrogge thanks for addressing my comments! Here are some responses to the open discussions. Next, I will run the tests again, and start a fresh review round

sys/Makefile.dep Outdated Show resolved Hide resolved
/**
* @brief MakeCredential method
*
* CTAP specification (version 20190130) section 5.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are (still) multiple occurrences of "CTAP2" in your code (for example in line 35 of this file). Please correct them. I wanted to say that you should also check new files&folders for usage of "CTAP2" instead of "CTAP"

sys/fido2/ctap/ctap.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap_crypto.c Outdated Show resolved Hide resolved
sys/fido2/ctap/ctap_crypto.c Outdated Show resolved Hide resolved
sys/include/fido2/ctap/transport/ctap_transport.h Outdated Show resolved Hide resolved
sys/include/fido2/ctap/transport/ctap_transport.h Outdated Show resolved Hide resolved
sys/include/fido2/ctap/transport/hid/ctap_transport_hid.h Outdated Show resolved Hide resolved
@PeterKietzmann
Copy link
Member

Short notice: I've tested again with the nrf52840dk.

  1. webauthn.io still works like charm. I was wondering, what is the maximum number of accounts per authenticator with your implementation? So far, i've only tested with two accounts.
  2. The unit test seems to work in general. Happy to see that you were able to move to the original repo. by now, they almost doubled the number of tests 👍
    There are, however, still some errors. Would you mind to take a look at
this output
========================================================================= FAILURES ==========================================================================
_______________________________________________________________________ test_lockout ________________________________________________________________________

device = <tests.conftest.TestDevice object at 0x7f75a2025610>, resetDevice = <tests.conftest.TestDevice object at 0x7f75a2025610>

    @pytest.mark.skipif(
        "trezor" in sys.argv, reason="ClientPin is not supported on Trezor."
    )
    def test_lockout(device, resetDevice):
        pin = "TestPin"
        device.client.pin_protocol.set_pin(pin)
    
        pin_token = device.client.pin_protocol.get_pin_token(pin)
        req = FidoRequest(pin_token=pin_token)
    
        req.pin_auth = hmac_sha256(pin_token, req.cdh)[:16]
    
        for i in range(1, 10):
            err = CtapError.ERR.PIN_INVALID
            if i in (3, 6):
                err = CtapError.ERR.PIN_AUTH_BLOCKED
            elif i >= 8:
                err = [CtapError.ERR.PIN_BLOCKED, CtapError.ERR.PIN_INVALID]
    
            with pytest.raises(CtapError) as e:
                device.sendPP("WrongPin")
            assert e.value.code == err or e.value.code in err
    
            attempts = 8 - i
            if i > 8:
                attempts = 0
    
            res = device.ctap2.client_pin(1, PinProtocolV1.CMD.GET_RETRIES)
            assert res[3] == attempts
    
            if err == CtapError.ERR.PIN_AUTH_BLOCKED:
>               device.reboot()

tests/standard/fido2/pin/test_lockout.py:40: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:302: in reboot
    self.find_device(self.nfc_interface_only)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tests.conftest.TestDevice object at 0x7f75a2025610>, nfcInterfaceOnly = False

    def find_device(self, nfcInterfaceOnly=False):
        dev = None
        self.nfc_interface_only = nfcInterfaceOnly
        if not nfcInterfaceOnly:
            print("--- HID ---")
            print(list(CtapHidDevice.list_devices()))
            dev = next(CtapHidDevice.list_devices(), None)
    
        '''
        else:
            from fido2.pcsc import CtapPcscDevice
    
            print("--- NFC ---")
            dev = next(MoreRobustPcscDevice.list_devices(), None)
    
            if dev:
                self.is_nfc = True
                # For ACR1252 readers, with drivers installed
                # https://www.acs.com.hk/en/products/342/acr1252u-usb-nfc-reader-iii-nfc-forum-certified-reader
                # disable auto pps, always use 106kbps
                # dev.control_exchange(SCARD_CTL_CODE(0x3500), b"\xE0\x00\x00\x24\x02\x00\x00")
        '''
    
        if not dev:
>           raise RuntimeError("No FIDO device found")
E           RuntimeError: No FIDO device found

tests/conftest.py:259: RuntimeError
__________________________________________________________________ TestSetPin.test_set_pin __________________________________________________________________

self = <tests.standard.fido2.pin.test_set_pin.TestSetPin object at 0x7f75a14d40a0>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_set_pin(self, device):
>       device.client.pin_protocol.set_pin("TestPin")

tests/standard/fido2/pin/test_set_pin.py:23: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.8/site-packages/fido2/ctap2.py:940: in set_pin
    key_agreement, shared_secret = self.get_shared_secret()
venv/lib/python3.8/site-packages/fido2/ctap2.py:885: in get_shared_secret
    resp = self.ctap.client_pin(
venv/lib/python3.8/site-packages/fido2/ctap2.py:776: in client_pin
    return self.send_cbor(
venv/lib/python3.8/site-packages/fido2/ctap2.py:642: in send_cbor
    response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 144, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
______________________________________________________________ TestSetPin.test_set_pin_too_big ______________________________________________________________

self = <tests.standard.fido2.pin.test_set_pin.TestSetPin object at 0x7f75a13c0490>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_set_pin_too_big(self, device):
        with pytest.raises(CtapError) as e:
>           device.client.pin_protocol.set_pin("A" * 64)

tests/standard/fido2/pin/test_set_pin.py:28: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.8/site-packages/fido2/ctap2.py:940: in set_pin
    key_agreement, shared_secret = self.get_shared_secret()
venv/lib/python3.8/site-packages/fido2/ctap2.py:885: in get_shared_secret
    resp = self.ctap.client_pin(
venv/lib/python3.8/site-packages/fido2/ctap2.py:776: in client_pin
    return self.send_cbor(
venv/lib/python3.8/site-packages/fido2/ctap2.py:642: in send_cbor
    response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 144, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_______________________________________________________ TestSetPin.test_get_pin_token_but_no_pin_set ________________________________________________________

self = <tests.standard.fido2.pin.test_set_pin.TestSetPin object at 0x7f75a12d7070>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_get_pin_token_but_no_pin_set(self, device):
        with pytest.raises(CtapError) as e:
>           device.client.pin_protocol.get_pin_token("TestPin")

tests/standard/fido2/pin/test_set_pin.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.8/site-packages/fido2/ctap2.py:905: in get_pin_token
    key_agreement, shared_secret = self.get_shared_secret()
venv/lib/python3.8/site-packages/fido2/ctap2.py:885: in get_shared_secret
    resp = self.ctap.client_pin(
venv/lib/python3.8/site-packages/fido2/ctap2.py:776: in client_pin
    return self.send_cbor(
venv/lib/python3.8/site-packages/fido2/ctap2.py:642: in send_cbor
    response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 144, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_________________________________________________________ TestSetPin.test_change_pin_but_no_pin_set _________________________________________________________

self = <tests.standard.fido2.pin.test_set_pin.TestSetPin object at 0x7f75a1371eb0>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_change_pin_but_no_pin_set(self, device):
        with pytest.raises(CtapError) as e:
>           device.client.pin_protocol.change_pin("TestPin", "1234")

tests/standard/fido2/pin/test_set_pin.py:38: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.8/site-packages/fido2/ctap2.py:964: in change_pin
    key_agreement, shared_secret = self.get_shared_secret()
venv/lib/python3.8/site-packages/fido2/ctap2.py:885: in get_shared_secret
    resp = self.ctap.client_pin(
venv/lib/python3.8/site-packages/fido2/ctap2.py:776: in client_pin
    return self.send_cbor(
venv/lib/python3.8/site-packages/fido2/ctap2.py:642: in send_cbor
    response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 144, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_________________________________________________________ TestSetPin.test_setting_pin_and_get_info __________________________________________________________

self = <tests.standard.fido2.pin.test_set_pin.TestSetPin object at 0x7f75a153abe0>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_setting_pin_and_get_info(self, device):
>       device.client.pin_protocol.set_pin("TestPin")

tests/standard/fido2/pin/test_set_pin.py:42: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.8/site-packages/fido2/ctap2.py:940: in set_pin
    key_agreement, shared_secret = self.get_shared_secret()
venv/lib/python3.8/site-packages/fido2/ctap2.py:885: in get_shared_secret
    resp = self.ctap.client_pin(
venv/lib/python3.8/site-packages/fido2/ctap2.py:776: in client_pin
    return self.send_cbor(
venv/lib/python3.8/site-packages/fido2/ctap2.py:642: in send_cbor
    response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 144, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
__________________________________________________________________ TestHID.test_long_ping ___________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a13e27c0>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_long_ping(self, device):
        amt = 1000
        pingdata = os.urandom(amt)
    
        t1 = time.time() * 1000
>       r = device.send_data(CTAPHID.PING, pingdata)

tests/standard/transport/test_hid.py:19: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 129, 3, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_____________________________________________________________________ TestHID.test_init _____________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a13c5340>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>
check_timeouts = False

    def test_init(self, device, check_timeouts=False):
        if check_timeouts:
            with pytest.raises(socket.timeout):
                cmd, resp = self.recv_raw()
    
        payload = b"\x11\x11\x11\x11\x11\x11\x11\x11"
>       r = device.send_data(CTAPHID.INIT, payload)

tests/standard/transport/test_hid.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 134, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_____________________________________________________________________ TestHID.test_ping _____________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a128b670>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_ping(self, device):
    
        pingdata = os.urandom(100)
>       r = device.send_data(CTAPHID.PING, pingdata)

tests/standard/transport/test_hid.py:40: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 129, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_____________________________________________________________________ TestHID.test_wink _____________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a1457c40>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_wink(self, device):
>       r = device.send_data(CTAPHID.WINK, "")

tests/standard/transport/test_hid.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 136, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_______________________________________________________________ TestHID.test_cbor_no_payload ________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a1471130>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_cbor_no_payload(self, device):
        payload = b"\x11\x11\x11\x11\x11\x11\x11\x11"
>       r = device.send_data(CTAPHID.INIT, payload)

tests/standard/transport/test_hid.py:48: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 134, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
______________________________________________________________ TestHID.test_no_data_in_u2f_msg ______________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a1433100>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_no_data_in_u2f_msg(self, device):
        payload = b"\x11\x11\x11\x11\x11\x11\x11\x11"
>       r = device.send_data(CTAPHID.INIT, payload)

tests/standard/transport/test_hid.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 134, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_______________________________________________________________ TestHID.test_invalid_hid_cmd ________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a131f220>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_invalid_hid_cmd(self, device):
>       r = device.send_data(CTAPHID.INIT, "\x11\x22\x33\x44\x55\x66\x77\x88")

tests/standard/transport/test_hid.py:74: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 134, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_______________________________________________________________ TestHID.test_oversize_packet ________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a1457b80>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_oversize_packet(self, device):
>       device.send_raw("\x81\x1d\xba\x00")

tests/standard/transport/test_hid.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:326: in send_raw
    self.dev._dev.InternalSendPacket(Packet(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 129, 29, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_____________________________________________________________ TestHID.test_skip_sequence_number _____________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a14c6610>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_skip_sequence_number(self, device):
>       r = device.send_data(CTAPHID.PING, "\x44" * 200)

tests/standard/transport/test_hid.py:86: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 129, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_______________________________________________________________ TestHID.test_resync_and_ping ________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a12a7c70>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_resync_and_ping(self, device):
>       r = device.send_data(CTAPHID.INIT, "\x11\x22\x33\x44\x55\x66\x77\x88")

tests/standard/transport/test_hid.py:96: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 134, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
__________________________________________________________________ TestHID.test_ping_abort __________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a12d7cd0>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_ping_abort(self, device):
>       device.send_raw("\x81\x04\x00")

tests/standard/transport/test_hid.py:103: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:326: in send_raw
    self.dev._dev.InternalSendPacket(Packet(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 129, 4, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
___________________________________________________________________ TestHID.test_timeout ____________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a131f1c0>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_timeout(self, device):
>       device.send_data(CTAPHID.INIT, "\x11\x22\x33\x44\x55\x66\x77\x88")

tests/standard/transport/test_hid.py:139: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 134, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
___________________________________________________________________ TestHID.test_not_cont ___________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a12b31f0>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>
check_timeouts = False

    def test_not_cont(self, device, check_timeouts=False):
>       device.send_data(CTAPHID.INIT, "\x11\x22\x33\x44\x55\x66\x77\x88")

tests/standard/transport/test_hid.py:152: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 134, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
__________________________________________________________________ TestHID.test_check_busy __________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a13925b0>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_check_busy(self, device):
        t1 = time.time() * 1000
>       device.send_data(CTAPHID.INIT, "\x11\x22\x33\x44\x55\x66\x77\x88")

tests/standard/transport/test_hid.py:169: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [2, 0, 0, 0, 134, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
____________________________________________________________ TestHID.test_check_busy_interleaved ____________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a12aecd0>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_check_busy_interleaved(self, device):
        cid1 = "\x11\x22\x33\x44"
        cid2 = "\x01\x22\x33\x44"
        device.set_cid(cid2)
>       device.send_data(CTAPHID.INIT, "\x11\x22\x33\x44\x55\x66\x77\x88")

tests/standard/transport/test_hid.py:190: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:309: in send_data
    return self.dev.call(cmd, data, event, on_keepalive = on_keepalive)
venv/lib/python3.8/site-packages/fido2/hid.py:86: in call
    self._dev.InternalSend(TYPE_INIT | cmd, bytearray(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:277: in InternalSend
    self.InternalSendPacket(first_packet)
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [1, 34, 51, 68, 134, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
____________________________________________________________________ TestHID.test_cid_0 _____________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a128b1c0>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_cid_0(self, device):
        device.set_cid("\x00\x00\x00\x00")
>       device.send_raw(
            "\x86\x00\x08\x11\x22\x33\x44\x55\x66\x77\x88", cid="\x00\x00\x00\x00"
        )

tests/standard/transport/test_hid.py:217: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:326: in send_raw
    self.dev._dev.InternalSendPacket(Packet(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [0, 0, 0, 0, 134, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
_________________________________________________________________ TestHID.test_cid_ffffffff _________________________________________________________________

self = <tests.standard.transport.test_hid.TestHID object at 0x7f75a2d9f580>, device = <tests.conftest.TestDevice object at 0x7f75a2025610>

    def test_cid_ffffffff(self, device):
    
        device.set_cid("\xff\xff\xff\xff")
>       device.send_raw(
            "\x81\x00\x08\x11\x22\x33\x44\x55\x66\x77\x88", cid="\xff\xff\xff\xff"
        )

tests/standard/transport/test_hid.py:228: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:326: in send_raw
    self.dev._dev.InternalSendPacket(Packet(data))
venv/lib/python3.8/site-packages/fido2/_pyu2f/hidtransport.py:293: in InternalSendPacket
    self.hid_device.Write(wire)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2._pyu2f.linux.LinuxHidDevice object at 0x7f75a155f250>, packet = [255, 255, 255, 255, 129, 0, ...]

    def Write(self, packet):
      """See base class."""
      out = bytes(bytearray([0] + packet))  # Prepend the zero-byte (report ID)
>     os.write(self.dev, out)
E     OSError: [Errno 19] No such device

venv/lib/python3.8/site-packages/fido2/_pyu2f/linux.py:222: OSError
================================================================== short test summary info ==================================================================
FAILED tests/standard/fido2/pin/test_lockout.py::test_lockout - RuntimeError: No FIDO device found
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_set_pin - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_set_pin_too_big - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_get_pin_token_but_no_pin_set - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_change_pin_but_no_pin_set - OSError: [Errno 19] No such device
FAILED tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_setting_pin_and_get_info - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_long_ping - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_init - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_ping - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_wink - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_cbor_no_payload - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_no_data_in_u2f_msg - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_invalid_hid_cmd - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_oversize_packet - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_skip_sequence_number - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_resync_and_ping - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_ping_abort - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_timeout - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_not_cont - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_check_busy - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_check_busy_interleaved - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_cid_0 - OSError: [Errno 19] No such device
FAILED tests/standard/transport/test_hid.py::TestHID::test_cid_ffffffff - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_set_pin_twice[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_get_key_agreement_fields[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_verify_flag[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_get_no_pin_auth[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_zero_length_pin_auth[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_make_credential_no_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPin::test_get_assertion_no_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestChangePin::test_change_pin[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_pin.py::TestPinAttempts::test_pin_attempts[123456789A] - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/pin/test_set_pin.py::TestSetPin::test_send_zero_length_pin_auth - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_user_presence_instructions - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_user_presence - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_no_user_presence - OSError: [Errno 19] No such device
ERROR tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_user_presence_option_false_on_get_assertion - OSError: [Errno 19] N...
ERROR tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_user_presence_option_false_on_make_credential - OSError: [Errno 19]...
ERROR tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_user_presence_permits_only_one_request - OSError: [Errno 19] No suc...
======================================= 23 failed, 92 passed, 8 skipped, 7 deselected, 17 errors in 106.16s (0:01:46) =======================================
make[1]: *** [Makefile:19: standard-tests] Fehler 1
make: *** [Makefile:20: fido2-test] Fehler 2
kietzmann@kietzmann:/media/DATA/RIOT/tests/sys_fido2_ctap$ make fido2-test 
make -C /media/DATA/RIOT/build/pkg/fido2_tests
venv/bin/pytest --ignore=tests/standard/fido2v1 --ignore=tests/standard/fido2/extensions --ignore=tests/standard/u2f -k "not test_ctap1_interop and not test_rk_maximum_list_capacity_per_rp_nodisplay and not test_keep_alive" tests/standard/ -s
==================================================================== test session starts ====================================================================
platform linux -- Python 3.8.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /media/DATA/RIOT/build/pkg/fido2_tests
plugins: rerunfailures-10.0, ordering-0.6
collected 147 items / 7 deselected / 140 selected                                                                                                           

tests/standard/connect_test.py --- HID ---
[CtapHidDevice(/dev/hidraw0)]
.
tests/standard/fido2/test_get_assertion.py Resetting Authenticator...
.......................Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw0)]
.
tests/standard/fido2/test_getinfo.py ...........
tests/standard/fido2/test_make_credential.py Resetting Authenticator...
.................................MC [b'123456789abcdef0123456789abcdef0', {'id': 'example.org', 'name': 'ExampleRP'}, {'id': b'N\x0f\x84\xc2\xff\xae\x11\x00\xb0d\x07^\xd1\xe0EWe\xcb\xd9\xdc\xf0[\x99\xd4<43\x18\xf7\x87\x94V\xd3\xce+\x13&\x14Y\xa4\xd1Ss\xc5\x8b', 'name': 'Jilleen Agnola Evey', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Jilleen Agnola Evey'}, [{'type': 'public-key', 'alg': -7}], None, None, {'unknown': False}, None, None, None, <tests.vendor.solo.utils.DeviceSelectCredential object at 0x7f94fa60c160>]
.ed25519 is not supported.  Skip this test.
.
tests/standard/fido2/test_reset.py Resetting Authenticator...
.
tests/standard/fido2/test_reset_credential.py Resetting Authenticator...
Resetting Authenticator...
.
tests/standard/fido2/test_resident_key.py Resetting Authenticator...
.Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw0)]
.Resetting Authenticator...
.Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw0)]
.Resetting Authenticator...
Resetting Authenticator...
.Resetting Authenticator...
Resetting Authenticator...
.Resetting Authenticator...
...
            {'id': b'7\xc8\x05\xb9n\xc7\x7f\xee\xb7Zb\xf9\x89l"\xeb8QD\xbfG\xe4\xa3\x8a\x9e\xbd}\x98JP+2L\xc0\xf3\x81*Z\x0c\x90\xba\xa5\xa4h>}b\x08O\xce|', 'name': 'Morgana Athene Joscelin', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Morgana Athene Joscelin'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.8474736579670072.com', 'name': 'Example'}
            

            {'id': b'\xf7\x00\x97\xb74\x80\xa76ME\xaf\xebE\x81J\xda\xc2\x1a\xb9\x07\xa1A7@\xdb\xdcN\xad\n?\xfa\x12\xc9\xf4\xb2b', 'name': 'Marchelle Katie Willamina', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Marchelle Katie Willamina'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.8474736579670072.com', 'name': 'Example'}
            

            {'id': b"h\xe1\x9f'\x0f\xfc", 'name': 'Loise Christie Daniela', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Loise Christie Daniela'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.8474736579670072.com', 'name': 'Example'}
            
.s.sResetting Authenticator...
...
            {'id': b'_\x0e~\xaf\xf3\xd1\xcf}"\x13\x00\xa0\xce\x83', 'name': 'Jenifer Allie Danell', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Jenifer Allie Danell'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.28421357863210517.com', 'name': 'Example'}
            

            {'id': b'I\xd5\xd3\x81vg\xe0\x0c1\xf1\xb3G\xf0\xdc\x87H\x1cM\xdd\x1e\x9av\xf2Kd\xfe\x05', 'name': 'Fifine Margot Sandye', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Fifine Margot Sandye'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.28421357863210517.com', 'name': 'Example'}
            

            {'id': b'\xa4\xa9\xf9,\x10a)\x08\xf1\x04\xa4\xd3\xd9\xdf{\x11PT\xce', 'name': 'Bonnee Ellyn Antonia', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Bonnee Ellyn Antonia'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.28421357863210517.com', 'name': 'Example'}
            
.s.sssResetting Authenticator...
...
tests/standard/fido2/pin/test_lockout.py Resetting Authenticator...
Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw0)]
F
tests/standard/fido2/pin/test_pin.py Resetting Authenticator...
........Resetting Authenticator...
.Resetting Authenticator...
Check there is 7 pin attempts left
Check there is 6 pin attempts left
Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw0)]
F
tests/standard/fido2/pin/test_set_pin.py Resetting Authenticator...
.Resetting Authenticator...
....Resetting Authenticator...
.
tests/standard/fido2/user_presence/test_user_presence.py Resetting Authenticator...


Starting User Presence (UP) tests.

Follow instructions.  You will have to give UP or not give UP to pass the tests.
.ACTIVATE UP ONCE
.DO NOT ACTIVATE UP
FsDO NOT ACTIVATE UP
.DO NOT ACTIVATE UP
.ACTIVATE UP ONCE
F
tests/standard/transport/test_hid.py .b'\x11\x11\x11\x11\x11\x11\x11\x11\x0c\x00\x00\x00\x02\x00\x00\x00\r'
...Implements CBOR.
.U2F not implemented.
............
tests/standard/transport/test_nfc.py s

========================================================================= FAILURES ==========================================================================
_______________________________________________________________________ test_lockout ________________________________________________________________________

device = <tests.conftest.TestDevice object at 0x7f94f989a610>, resetDevice = <tests.conftest.TestDevice object at 0x7f94f989a610>

    @pytest.mark.skipif(
        "trezor" in sys.argv, reason="ClientPin is not supported on Trezor."
    )
    def test_lockout(device, resetDevice):
        pin = "TestPin"
        device.client.pin_protocol.set_pin(pin)
    
        pin_token = device.client.pin_protocol.get_pin_token(pin)
        req = FidoRequest(pin_token=pin_token)
    
        req.pin_auth = hmac_sha256(pin_token, req.cdh)[:16]
    
        for i in range(1, 10):
            err = CtapError.ERR.PIN_INVALID
            if i in (3, 6):
                err = CtapError.ERR.PIN_AUTH_BLOCKED
            elif i >= 8:
                err = [CtapError.ERR.PIN_BLOCKED, CtapError.ERR.PIN_INVALID]
    
            with pytest.raises(CtapError) as e:
                device.sendPP("WrongPin")
>           assert e.value.code == err or e.value.code in err
E           TypeError: argument of type 'ERR' is not iterable

tests/standard/fido2/pin/test_lockout.py:30: TypeError
_______________________________________________________ TestPinAttempts.test_pin_attempts[123456789A] _______________________________________________________

self = <tests.standard.fido2.pin.test_pin.TestPinAttempts object at 0x7f94f8d6be20>, device = <tests.conftest.TestDevice object at 0x7f94f989a610>
SetPinRes = AttestationObject(fmt: 'packed', auth_data: AuthenticatorData(rp_id_hash: h'bfabc37432958b063360d3ad6461c9c4735ae7f8ed...xefj\xbe\x9eF\x106\xe4\x02 <q\xd8\xb5M\x8a\x9c\x025\xc7\x8a\xe7 G,h'\x1d\x94\xd9*\x13L\x96\x9eM=\xf8\xfd\x97\xdf\xf1"})

    @pytest.mark.skipif(
        "trezor" in sys.argv, reason="ClientPin is not supported on Trezor."
    )
    def test_pin_attempts(self, device, SetPinRes):
        # Flip 1 bit
        pin = SetPinRes.PIN
        pin_wrong = list(pin)
        c = pin[len(pin) // 2]
    
        pin_wrong[len(pin) // 2] = chr(ord(c) ^ 1)
        pin_wrong = "".join(pin_wrong)
    
        for i in range(1, 3):
            with pytest.raises(CtapError) as e:
                device.sendPP(pin_wrong)
            assert e.value.code == CtapError.ERR.PIN_INVALID
    
            print("Check there is %d pin attempts left" % (8 - i))
            res = device.ctap2.client_pin(1, PinProtocolV1.CMD.GET_RETRIES)
            assert res[3] == (8 - i)
    
        for i in range(1, 3):
            with pytest.raises(CtapError) as e:
                device.sendPP(pin_wrong)
            assert e.value.code == CtapError.ERR.PIN_AUTH_BLOCKED
    
        device.reboot()
    
>       reg = device.sendMC(*FidoRequest(SetPinRes, pin = pin).toMC())

tests/standard/fido2/pin/test_pin.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/conftest.py:444: in sendMC
    pin_token = self.client.pin_protocol.get_pin_token(pin)
venv/lib/python3.8/site-packages/fido2/ctap2.py:905: in get_pin_token
    key_agreement, shared_secret = self.get_shared_secret()
venv/lib/python3.8/site-packages/fido2/ctap2.py:885: in get_shared_secret
    resp = self.ctap.client_pin(
venv/lib/python3.8/site-packages/fido2/ctap2.py:776: in client_pin
    return self.send_cbor(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fido2.ctap2.CTAP2 object at 0x7f94f8d6b6d0>, cmd = <CMD.CLIENT_PIN: 6>, data = {1: 1, 2: <CMD.GET_KEY_AGREEMENT: 2>}, event = None
parse = <function decode at 0x7f94f9b8e9d0>, on_keepalive = None

    def send_cbor(
        self, cmd, data=None, event=None, parse=cbor.decode, on_keepalive=None
    ):
        """Sends a CBOR message to the device, and waits for a response.
    
        :param cmd: The command byte of the request.
        :param data: The payload to send (to be CBOR encoded).
        :param event: Optional threading.Event used to cancel the request.
        :param parse: Function used to parse the binary response data, defaults
            to parsing the CBOR.
        :param on_keepalive: Optional function called when keep-alive is sent by
            the authenticator.
        :return: The result of calling the parse function on the response data
            (defaults to the CBOR decoded value).
        """
        request = struct.pack(">B", cmd)
        if data is not None:
            request += cbor.encode(data)
        response = self.device.call(CTAPHID.CBOR, request, event, on_keepalive)
        status = six.indexbytes(response, 0)
        if status != 0x00:
>           raise CtapError(status)
E           fido2.ctap.CtapError: CTAP error: 0x34 - PIN_AUTH_BLOCKED

venv/lib/python3.8/site-packages/fido2/ctap2.py:645: CtapError
__________________________________________________________ TestUserPresence.test_no_user_presence ___________________________________________________________

self = <test_user_presence.TestUserPresence object at 0x7f94f8dd03a0>, device = <tests.conftest.TestDevice object at 0x7f94f989a610>
MCRes = AttestationObject(fmt: 'packed', auth_data: AuthenticatorData(rp_id_hash: h'bfabc37432958b063360d3ad6461c9c4735ae7f8ed...\xd5\x9e1\x04\xe9\x84\x89\x02 ^\xcc\x15\xb0u\xbe\xc9,z\xa0\xbe9\xc9\xc5\x84B\xb2Jq\x1c\xcbe\x150P\x12\x7fZ\x80\xf7vi'})
GARes = AssertionResponse(credential: {'id': b'\xcb\x07`\x1d*\x14\xaa\xe1k\xeb7DT\x90\xf4A+\r\xc3e\xecs\x16O\\\x87\x98\x01"\xf...b9f3c1f804d6d133f27d401713d05e16b4816cbc55f9814022100d814509fff921e79c2e7ed72a294cc3dcfade685e7114b1fa5807e6708d29be1')

    def test_no_user_presence(self, device, MCRes, GARes):
        print("DO NOT ACTIVATE UP")
        with pytest.raises(CtapError) as e:
            with Timeout(2.0) as event:
>               device.sendGA(
                    *FidoRequest(GARes, timeout=event, on_keepalive=None).toGA()
                )
E               Failed: DID NOT RAISE <class 'fido2.ctap.CtapError'>

tests/standard/fido2/user_presence/test_user_presence.py:34: Failed
_______________________________________________ TestUserPresence.test_user_presence_permits_only_one_request ________________________________________________

self = <test_user_presence.TestUserPresence object at 0x7f94f8d45d90>, device = <tests.conftest.TestDevice object at 0x7f94f989a610>
MCRes = AttestationObject(fmt: 'packed', auth_data: AuthenticatorData(rp_id_hash: h'bfabc37432958b063360d3ad6461c9c4735ae7f8ed...\xd5\x9e1\x04\xe9\x84\x89\x02 ^\xcc\x15\xb0u\xbe\xc9,z\xa0\xbe9\xc9\xc5\x84B\xb2Jq\x1c\xcbe\x150P\x12\x7fZ\x80\xf7vi'})
GARes = AssertionResponse(credential: {'id': b'\xcb\x07`\x1d*\x14\xaa\xe1k\xeb7DT\x90\xf4A+\r\xc3e\xecs\x16O\\\x87\x98\x01"\xf...b9f3c1f804d6d133f27d401713d05e16b4816cbc55f9814022100d814509fff921e79c2e7ed72a294cc3dcfade685e7114b1fa5807e6708d29be1')

    def test_user_presence_permits_only_one_request(self, device, MCRes, GARes):
        print("ACTIVATE UP ONCE")
        device.sendGA(*FidoRequest(GARes).toGA())
    
        with pytest.raises(CtapError) as e:
            with Timeout(1.0) as event:
>               device.sendGA(
                    *FidoRequest(GARes, timeout=event, on_keepalive=None).toGA()
                )
E               Failed: DID NOT RAISE <class 'fido2.ctap.CtapError'>

tests/standard/fido2/user_presence/test_user_presence.py:80: Failed
================================================================== short test summary info ==================================================================
FAILED tests/standard/fido2/pin/test_lockout.py::test_lockout - TypeError: argument of type 'ERR' is not iterable
FAILED tests/standard/fido2/pin/test_pin.py::TestPinAttempts::test_pin_attempts[123456789A] - fido2.ctap.CtapError: CTAP error: 0x34 - PIN_AUTH_BLOCKED
FAILED tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_no_user_presence - Failed: DID NOT RAISE <class 'fido2.ctap.CtapEr...
FAILED tests/standard/fido2/user_presence/test_user_presence.py::TestUserPresence::test_user_presence_permits_only_one_request - Failed: DID NOT RAISE <cl...
============================================ 4 failed, 128 passed, 8 skipped, 7 deselected in 114.88s (0:01:54) =============================================

@Ollrogge
Copy link
Contributor Author

Ollrogge commented Sep 6, 2021

Some boards don't have a button and raise error: 'BTN0_PIN' undeclared (first use in this function)...

@Ollrogge mind to find a fix?

Will do today :) In my opinion the second solution you proposed is the best ?

sys/Makefile.dep Outdated Show resolved Hide resolved
@PeterKietzmann
Copy link
Member

I would like to merge this PR soon, knowing that there is follow-up work. What is the state of this discussion? @benpicco, do you see your other comments addressed? @Ollrogge I think you can squash already your latest commits.

@PeterKietzmann PeterKietzmann removed the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 7, 2021
@PeterKietzmann
Copy link
Member

Tested kconfig with nrf52840dk with this change applied to the test file:

diff --git a/tests/sys_fido2_ctap/main.c b/tests/sys_fido2_ctap/main.c
index 31ffbc44ef..ac5f5b24da 100644
--- a/tests/sys_fido2_ctap/main.c
+++ b/tests/sys_fido2_ctap/main.c
@@ -25,12 +25,35 @@
 
 #include "xtimer.h"
 
-#include "fido2/ctap.h"
+#include "fido2/ctap/ctap.h"
+#include "fido2/ctap/ctap_mem.h"
+#include "fido2/ctap/transport/hid/ctap_hid.h"
 #include "fido2/ctap/transport/ctap_transport.h"
 
 int main(void)
 {
     /* sleep in order to see early DEBUG outputs */
     xtimer_sleep(3);
+    printf("CTAP_STACKSIZE: %i\n", CTAP_STACKSIZE);
+    printf("CTAP_AAGUID: %s\n", CTAP_AAGUID);
+#if IS_ACTIVE(CONFIG_FIDO2_CTAP_DISABLE_UP)
+    printf("CONFIG_FIDO2_CTAP_DISABLE_UP: %i\n", CONFIG_FIDO2_CTAP_DISABLE_UP);
+#endif
+#if IS_ACTIVE(CONFIG_FIDO2_CTAP_DISABLE_LED)
+    printf("CONFIG_FIDO2_CTAP_DISABLE_LED: %i\n", CONFIG_FIDO2_CTAP_DISABLE_LED);
+#endif
+    printf("CTAP_UP_TIMEOUT: %lu\n", CTAP_UP_TIMEOUT);
+#if IS_ACTIVE(CONFIG_FIDO2_CTAP_UP_BUTTON_PORT)
+    printf("CONFIG_FIDO2_CTAP_UP_BUTTON_PORT: %i\n", CONFIG_FIDO2_CTAP_UP_BUTTON_PORT);
+#endif
+#if IS_ACTIVE(CONFIG_FIDO2_CTAP_UP_BUTTON_PIN)
+    printf("CONFIG_FIDO2_CTAP_UP_BUTTON_PIN: %i\n", CONFIG_FIDO2_CTAP_UP_BUTTON_PIN);
+#endif
+    printf("CTAP_UP_BUTTON: %i\n", CTAP_UP_BUTTON);
+    printf("CTAP_UP_BUTTON_MODE: %i\n", CTAP_UP_BUTTON_MODE);
+    printf("CTAP_UP_BUTTON_FLANK: %i\n", CTAP_UP_BUTTON_FLANK);
+    printf("CTAP_FLASH_START_PAGE: %i\n", CTAP_FLASH_START_PAGE);
+    printf("CTAP_HID_TRANSACTION_TIMEOUT: %lu\n", CTAP_HID_TRANSACTION_TIMEOUT);
+
     fido2_ctap_transport_init();
 }

Before config change

2021-09-08 11:01:15,584 # main(): This is RIOT! (Version: 2021.01-devel-4228-g3a8e4-HEAD)
2021-09-08 11:01:17,791 # CTAP_STACKSIZE: 15000
2021-09-08 11:01:17,795 # CTAP_AAGUID: 9c295865fa2c36b705a42320af9c8f16
2021-09-08 11:01:17,797 # CTAP_UP_TIMEOUT: 15000
2021-09-08 11:01:17,799 # CTAP_UP_BUTTON: 11
2021-09-08 11:01:17,802 # CTAP_UP_BUTTON_MODE: 12
2021-09-08 11:01:17,805 # CTAP_UP_BUTTON_FLANK: 2
2021-09-08 11:01:17,807 # CTAP_FLASH_START_PAGE: 252
2021-09-08 11:01:17,809 # CTAP_HID_TRANSACTION_TIMEOUT: 500000

After config change
1
2

(had to fix this to make compile)

2021-09-08 11:08:53,341 # main(): This is RIOT! (Version: 2021.01-devel-4228-g3a8e4-HEAD)
2021-09-08 11:08:55,412 # CTAP_STACKSIZE: 15666
2021-09-08 11:08:55,417 # CTAP_AAGUID: 66666665fa2c36b705a42320af9c8f16
2021-09-08 11:08:55,420 # CONFIG_FIDO2_CTAP_DISABLE_LED: 1
2021-09-08 11:08:55,422 # CTAP_UP_TIMEOUT: 66000
2021-09-08 11:08:55,423 # CTAP_UP_BUTTON: 0
2021-09-08 11:08:55,425 # CTAP_UP_BUTTON_MODE: 4
2021-09-08 11:08:55,428 # CTAP_UP_BUTTON_FLANK: 1
2021-09-08 11:08:55,430 # CTAP_FLASH_START_PAGE: 7
2021-09-08 11:08:55,432 # CTAP_HID_TRANSACTION_TIMEOUT: 666000

@PeterKietzmann
Copy link
Member

For the HID part dmesg shows the USB device:

[ 5821.317207] usb 5-3: new full-speed USB device number 4 using xhci_hcd
[ 5821.470835] usb 5-3: New USB device found, idVendor=1209, idProduct=7d01, bcdDevice= 0.00
[ 5821.470839] usb 5-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 5821.470841] usb 5-3: Product: USB device
[ 5821.470842] usb 5-3: Manufacturer: RIOT-os.org
[ 5821.470843] usb 5-3: SerialNumber: 6B64081122F6AFDA
[ 5821.475065] hid-generic 0003:1209:7D01.0009: hiddev3,hidraw7: USB HID v1.10 Device [RIOT-os.org USB device] on usb-0000:0d:00.0-3/input0

@PeterKietzmann
Copy link
Member

Registration and login works with webauthn.io (using chrome). I've created 6 accounts exemplarily, un-powered the device, powered it up again and successfully logged in.

Registration:
3
Login:
31
After user presence confirmation:
4

@PeterKietzmann
Copy link
Member

nrf52840dk unit test with disabled user presence (CFLAGS += -DCONFIG_FIDO2_CTAP_DISABLE_UP=1 and make fido2-test)

output
==================================================================== test session starts =====================================================================
platform linux -- Python 3.8.10, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /media/DATA/RIOT/build/pkg/fido2_tests
plugins: timeout-1.4.2, rerunfailures-10.1, ordering-0.6
collected 140 items / 7 deselected / 133 selected                                                                                                            

tests/standard/connect_test.py --- HID ---
[CtapHidDevice(/dev/hidraw7)]
.
tests/standard/fido2/test_get_assertion.py Resetting Authenticator...
.......................Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw8)]
.
tests/standard/fido2/test_getinfo.py ...........
tests/standard/fido2/test_make_credential.py Resetting Authenticator...
.................................MC [b'123456789abcdef0123456789abcdef0', {'id': 'example.org', 'name': 'ExampleRP'}, {'id': b'r\xbd\x00\xdc\xb0\xcdQ4.\xff\xa2\x96E\x04\x18\xd3\x14\xfb<\xfeeo<\xde78i\xdfsc|\xfe\xa7\xd6\x8bR\x0eo\xa3VzF\xeb\xb3\xfe\xd6\x0e\xda\xfe\xb9x', 'name': 'Regina Germana Vale', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Regina Germana Vale'}, [{'type': 'public-key', 'alg': -7}], None, None, {'unknown': False}, None, None, None, <tests.vendor.solo.utils.DeviceSelectCredential object at 0x7f37e211da60>]
.ed25519 is not supported.  Skip this test.
.
tests/standard/fido2/test_reset.py Resetting Authenticator...
.
tests/standard/fido2/test_reset_credential.py Resetting Authenticator...
Resetting Authenticator...
.
tests/standard/fido2/test_resident_key.py Resetting Authenticator...
.Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw9)]
.Resetting Authenticator...
.Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw10)]
.Resetting Authenticator...
Resetting Authenticator...
.Resetting Authenticator...
Resetting Authenticator...
.Resetting Authenticator...
...
            {'id': b'\xb9:\xfe\xa4nQ\xef\x1c\x9d\xf5E\xea\xd8Va\xd1\xd4[\xc5\x93]\xf8\xda\xc5\xb6', 'name': 'Amargo Doris Evangelina', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Amargo Doris Evangelina'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.3221286215619955.com', 'name': 'Example'}
            

            {'id': b'!\xb03\x11\x00\xbc\x1f\xb2\xfc1\t\xe7W\xd3\x87\x8f\x93\x06\x04+V\xa2j\t\xb4"\xe5p\x1fX\xf5\xef\x8e', 'name': 'Terrie Tine Audra', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Terrie Tine Audra'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.3221286215619955.com', 'name': 'Example'}
            

            {'id': b"+\xa1 \xb1sG\xaf'\xdb@8P\xb4sX\xc0\x95\x9bG>N-L\xa1\xf8&)\xd0\x02\xa1\x02\xf7K\xaa\x90\x07\xf0\xf0\xcd\x81\x92\x8c\x8aM\x8a\xbc\xd3\xce\xaf\xea\x1e\xe3\xe4ym\x07\xa9}\x18\xe7\xc0\x7f", 'name': 'Dniren Lucila Adey', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Dniren Lucila Adey'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.3221286215619955.com', 'name': 'Example'}
            
.s.sResetting Authenticator...
...
            {'id': b'k9\xdb\x89J\xd7\xb3\xc4\x14S^I\x86D\xcf\xb8', 'name': 'Judy Lilly Inna', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Judy Lilly Inna'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.14210188368817311.com', 'name': 'Example'}
            

            {'id': b">\xb0\xdb\xf1\xb3G\xce\xcbt\xcb>\x96\x9f\xac}\xa6\xc6\xb4\xac\x8e\x91\x83\x80a\x13\x13\x82\x0cS\xff\x05\xe6\xa5d\xbd3p\x19\x85\xb4U\xcf!\x0b\xb8\xba'\xa9\xc8@\xd8[\xd0\x05\xc2w^\xc4", 'name': 'Izabel Margery Virgina', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Izabel Margery Virgina'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.14210188368817311.com', 'name': 'Example'}
            

            {'id': b'\xfe\xe0|~`\x8a\xcc\xc3\x13\x91\x0c\x88\x8f\x01\x88\x15\x9c\xef\x9e\xc3^\x9fUM\xd4\x97w\xdaZ\t\x03\xf7v\xe5\x06dj:7H\x8a\xe7\xbfp\xbfP4\x0b\xbdg\x95\xf8\xbf\xac\xec\xf6#\xa9\xabMw\x89\x11', 'name': 'Traci Marianna Cissiee', 'icon': 'https://www.w3.org/TR/webauthn/', 'displayName': 'Displayed Traci Marianna Cissiee'}
            b'123456789abcdef0123456789abcdef0'
            {'id': 'unique-0.14210188368817311.com', 'name': 'Example'}
            
.s.sssResetting Authenticator...
...
tests/standard/fido2/pin/test_lockout.py Resetting Authenticator...
Please reboot authenticator and hit enter
^[[3~
--- HID ---
[CtapHidDevice(/dev/hidraw11)]
Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw12)]
Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw13)]
.
tests/standard/fido2/pin/test_pin.py Resetting Authenticator...
........Resetting Authenticator...
.Resetting Authenticator...
Check there is 7 pin attempts left
Check there is 6 pin attempts left
Please reboot authenticator and hit enter

--- HID ---
[CtapHidDevice(/dev/hidraw14)]
.
tests/standard/fido2/pin/test_set_pin.py Resetting Authenticator...
.Resetting Authenticator...
Resetting Authenticator...
....Resetting Authenticator...
Resetting Authenticator...
.
tests/standard/transport/test_hid.py .b'\x11\x11\x11\x11\x11\x11\x11\x11\x02\x00\x00\x00\x02\x00\x00\x00\r'
...Implements CBOR.
.U2F not implemented.
............
tests/standard/transport/test_nfc.py s

================================================== 126 passed, 7 skipped, 7 deselected in 205.27s (0:03:25) ==================================================

nrf52840dk unit test with enabled user presence (CFLAGS += -DCONFIG_FIDO2_CTAP_DISABLE_UP=1 and make fido2-test)

output
==================================================================== test session starts =====================================================================
platform linux -- Python 3.8.10, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /media/DATA/RIOT/build/pkg/fido2_tests
plugins: timeout-1.4.2, rerunfailures-10.1, ordering-0.6
collected 6 items                                                                                                                                            

tests/standard/fido2/user_presence/test_user_presence.py --- HID ---
[CtapHidDevice(/dev/hidraw7)]
Resetting Authenticator...


Starting User Presence (UP) tests.

Follow instructions.  You will have to give UP or not give UP to pass the tests.
.ACTIVATE UP ONCE
.DO NOT ACTIVATE UP
.sDO NOT ACTIVATE UP
.DO NOT ACTIVATE UP
.

=============================================================== 5 passed, 1 skipped in 43.51s ================================================================

--> pass

@PeterKietzmann PeterKietzmann added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines labels Sep 8, 2021
Copy link
Member

@PeterKietzmann PeterKietzmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a note somewhere that this can lead to surprise firmware corruption if FLASHPAGE_SIZE is not right.

Where did you address this?

@PeterKietzmann
Copy link
Member

ACK from my side. Please address the latest documentation fixes (in a single commit). You can squash the rest already

@PeterKietzmann
Copy link
Member

OK, please squash

@PeterKietzmann PeterKietzmann added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Sep 8, 2021
@PeterKietzmann
Copy link
Member

I executed again some functional tests on webauthn.io and the solokeys tests (without user presence) after the squash -> everything still works well. My ACK holds if Murdock agrees.

@PeterKietzmann
Copy link
Member

So many green lights, finally! Lets do this, ACK and go

@PeterKietzmann PeterKietzmann merged commit b98fa6d into RIOT-OS:master Sep 8, 2021
@benpicco benpicco added this to the Release 2021.10 milestone Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: security Area: Security-related libraries and subsystems Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants