Nitrokey / libnitrokey

Communicate with Nitrokey devices in a clean and easy manner
https://nitrokey.com/
GNU Lesser General Public License v3.0
65 stars 34 forks source link

Fix device discovery in NitrokeyManager::connect_with_path #194

Closed d-e-s-o closed 3 years ago

d-e-s-o commented 3 years ago

The device discovery in NitrokeyManager's connect_with_path method is broken. It tries to statically determine the vendor ID by using the first working HID pointer. That's obviously not working when a both a Nitrokey device and Librem Key are connected and the path is describing a Librem Key. In such a case the vendor ID used would be that for the Nitrokey and we would not be able to find the Librem Key at all. This change fixes up the logic.

d-e-s-o commented 3 years ago

Can this pull request please be merged? @szszszsz

szszszsz commented 3 years ago

Noted! Sorry for the delay. Scheduled early for the next week.

szszszsz commented 3 years ago

Merged, thank you!

d-e-s-o commented 3 years ago

Will you cut a new release with this fix? Without it, it's not possible to test for the Librem Key without manual labor in the form of physically replugging hardware keys.

szszszsz commented 3 years ago

Yes, should be done this week (delayed from the previous one).