From d7c1523f58190936ed08d30389399a941994d148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Belley?= Date: Wed, 26 Aug 2020 13:42:09 +0200 Subject: hw/usb: Add U2F device autoscan to passthru mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds an autoscan to let u2f-passthru choose the first U2F device it finds. The autoscan is performed using libudev with an enumeration of all the hidraw devices present on the host. The first device which happens to be a U2F device is taken to do the passtru. Signed-off-by: César Belley Message-id: 20200826114209.28821-13-cesar.belley@lse.epita.fr Signed-off-by: Gerd Hoffmann --- docs/u2f.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/u2f.txt') diff --git a/docs/u2f.txt b/docs/u2f.txt index f600528..8f44994 100644 --- a/docs/u2f.txt +++ b/docs/u2f.txt @@ -42,6 +42,10 @@ on libu2f-emu: configuring and building: ./configure --enable-u2f && make +The pass-through mode is built by default on Linux. To take advantage +of the autoscan option it provides, make sure you have a working libudev +installed on the host. + 3. Using u2f-emulated @@ -90,6 +94,11 @@ On the host specify the u2f-passthru device with a suitable hidraw: qemu -usb -device u2f-passthru,hidraw=/dev/hidraw0 +Alternately, the u2f-passthru device can autoscan to take the first +U2F device it finds on the host (this requires a working libudev): + + qemu -usb -device u2f-passthru + 5. Libu2f-emu -- cgit v1.1