Maintaining a working setup for the FIDO and admin app is a lot of work
and is redundant to the usbip runner provided as part of the Nitrokey 3
firmware. Therefore, this patch replaces the fido example with a much
simpler example that just sets up a dummy client responding to a vendor
command that requests random data.
This is sufficient for basic testing and getting started. For more
advanced use cases, the Nitrokey 3 runner should be used.
Fixes: https://github.com/trussed-dev/pc-usbip-runner/issues/31
Previously, we used our own ClientBuilder trait as a wrapper around
trussed’s own ClientBuilder struct so that Apps implementors don’t need
to pass around the service and syscall. But this limits the way the
runner can access the service, and is incompatible with recent changes
to the Nitrokey 3 firmware runner:
https://github.com/Nitrokey/nitrokey-3-firmware/pull/504
Therefore, this patch removes the ClientBuilder trait. Apps
implementers directly receive the Service and Syscall and can use
trussed::client::ClientBuilder to construct the clients, like they would
normally.
Our initial implementation of CTAPHID and CCID keepalive messages was a
bit too simple by potentially sending keepalive messages every five
milliseconds. This could overwhelm clients and, most importantly, spams
the log output.
This patch adds proper keepalive timeout handling, respecting the
timeout returned by the USB classes (currently 250 ms for CTAPHID and
1 s for CCID). This is also closer to the behavior on hardware.
This patch adds keepalive messages for ctaphid and ccid. To send
correct ctaphid keepalive messages, runners need to call set_waiting
from their UI implementation.
Fixes: https://github.com/trussed-dev/pc-usbip-runner/issues/27