hw/usb: Add U2F device check to passthru mode
authorCésar Belley <cesar.belley@lse.epita.fr>
Wed, 26 Aug 2020 11:42:08 +0000 (13:42 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 31 Aug 2020 06:23:39 +0000 (08:23 +0200)
commit4ee40a6b98c02b72fc5dd262df9d3ac8680d767b
treec1d100db86b90999dcb09734b220e227bde7060c
parentdea01f66811b6963f306a7dcffe001fb4637662f
hw/usb: Add U2F device check to passthru mode

This patchs adds a check to verify that the device passed through the
hidraw property is a U2F device.

The check is done by ensuring that the first values of the report
descriptor (USAGE PAGE and USAGE) correspond to those of a U2F device.

Signed-off-by: César Belley <cesar.belley@lse.epita.fr>
Message-id: 20200826114209.28821-12-cesar.belley@lse.epita.fr
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/u2f-passthru.c