Yubico / yubihsm-connector

https://developers.yubico.com/yubihsm-connector/
Apache License 2.0
30 stars 13 forks source link

Fix winusb issues under esxi #21

Closed qpernil closed 3 years ago

qpernil commented 3 years ago

This PR adresses a 2s delay in the status endpoint when run on Windows under ESXi. It essentially does what PR#19 did for libusb but for WinUsb. It now also has a couple of bug fixes that were discovered while implementing & testing.

The delay happens in the 'drain pipe' WinUsb_ReadPipe call, which takes 2s to execute when running under ESXi, despite having set the timeout pipe policy to 10 ms. It Doesn't do that on a physical Windows machine. This is not a big deal now since we only reopen the device on errors.