Closed fff7d1bc closed 5 years ago
Thanks for the report. What operating system is this on? How did you install ykman?
Hi,
This is Gentoo, tried both ykman installed via Portage tree and using pip
. The same results. otp
works, oath
is unable to detect device.
I'm not too familiar with gentoo, but it sounds like the CCID communication is not working correctly. Does $ ykman openpgp info
or $ ykman piv info
seem to work? You need some kind of smart card driver running, like pcscd
. Maybe this page is helpful? https://wiki.gentoo.org/wiki/PCSC-Lite
Did you have a chance do try the commands mentioned above?
Hi,
Both info
result in failing to find Yubikey here. By default Gentoo runs with udev, or udev compatible interface, but here I am using mdev insteadl. The pcsc-lite require either udev or libusb, I used the later, but when I try to debug the pcscd, when I run it with pcscd -a -d -f
the moment I insert Yubikey i see
07362783 hotplug_libusb.c:536:HPAddHotPluggable() Adding USB device: 1:5:0
00000037 readerfactory.c:1075:RFInitializeReader() Attempting startup of Yubico YubiKey OTP+FIDO+CCID 00 00 using /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Linux/libccid.so
00000104 readerfactory.c:950:RFBindFunctions() Loading IFD Handler 3.0
00000030 ifdhandler.c:1961:init_driver() Driver version: 1.4.30
00000940 ifdhandler.c:1978:init_driver() LogLevel: 0x0003
00000008 ifdhandler.c:1989:init_driver() DriverOptions: 0x0000
00000222 ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 0, device: usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if0
00000016 ccid_usb.c:302:OpenUSBByName() Using: /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Info.plist
00000884 ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau@free.fr)
00000007 ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver
00000004 ccid_usb.c:322:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.
00000791 ccid_usb.c:660:OpenUSBByName() Found Vendor/Product: 1050/0407 (Yubico YubiKey OTP+FIDO+CCID)
00000006 ccid_usb.c:662:OpenUSBByName() Using USB bus/device: 1/5
00000004 ccid_usb.c:722:OpenUSBByName() bNumDataRatesSupported is 0
00036691 ifdhandler.c:381:IFDHGetCapabilities() tag: 0xFB3, usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if0 (lun: 0)
00000016 readerfactory.c:396:RFAddReader() Using the reader polling thread
00000176 ifdhandler.c:381:IFDHGetCapabilities() tag: 0xFAE, usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if0 (lun: 0)
00000007 ifdhandler.c:476:IFDHGetCapabilities() Reader supports 1 slot(s)
00000007 hotplug_libusb.c:536:HPAddHotPluggable() Adding USB device: 1:5:1
00000011 ifdhandler.c:381:IFDHGetCapabilities() tag: 0xFAF, usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if0 (lun: 0)
00000007 readerfactory.c:727:RFSetReaderName() Support 16 simultaneous readers
00000372 ifdhandler.c:1154:IFDHPowerICC() action: PowerUp, usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if0 (lun: 0)
00000202 eventhandler.c:289:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
00000007 ifdhandler.c:381:IFDHGetCapabilities() tag: 0xFAD, usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if0 (lun: 0)
00000007 readerfactory.c:338:RFAddReader() Driver is thread safe
00000008 readerfactory.c:1075:RFInitializeReader() Attempting startup of Yubico YubiKey OTP+FIDO+CCID 01 00 using /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Linux/libccid.so
00000008 readerfactory.c:864:RFLoadReader() Reusing already loaded driver for /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Linux/libccid.so
00000004 Card ATR: 3B F8 13 00 00 81 31 FE 15 59 75 62 69 6B 65 79 34 D4
00000014 readerfactory.c:950:RFBindFunctions() Loading IFD Handler 3.0
00000029 ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 10000, device: usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if1
00000013 ccid_usb.c:302:OpenUSBByName() Using: /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Info.plist
00000939 ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau@free.fr)
00000008 ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver
00000005 ccid_usb.c:322:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.
00000216 ccid_usb.c:547:OpenUSBByName() USB device 1/5 already in use. Checking next one.
00000226 ccid_usb.c:799:OpenUSBByName() Device not found?
00000005 ifdhandler.c:150:CreateChannelByNameOrChannel() failed
00000006 readerfactory.c:1106:RFInitializeReader() Open Port 0x200001 Failed (usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if1)
00000007 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed.
00000005 readerfactory.c:610:RFRemoveReader() UnrefReader() count was: 1
00000006 readerfactory.c:1126:RFUnInitializeReader() Attempting shutdown of Yubico YubiKey OTP+FIDO+CCID 01 00.
00000018 hotplug_libusb.c:536:HPAddHotPluggable() Adding USB device: 1:5:2
00000008 ifdhandler.c:381:IFDHGetCapabilities() tag: 0xFAF, usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if0 (lun: 0)
00000006 readerfactory.c:727:RFSetReaderName() Support 16 simultaneous readers
00000006 ifdhandler.c:381:IFDHGetCapabilities() tag: 0xFAD, usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if0 (lun: 0)
00000006 readerfactory.c:338:RFAddReader() Driver is thread safe
00000005 readerfactory.c:1075:RFInitializeReader() Attempting startup of Yubico YubiKey OTP+FIDO+CCID 01 00 using /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Linux/libccid.so
00000006 readerfactory.c:864:RFLoadReader() Reusing already loaded driver for /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Linux/libccid.so
00000009 readerfactory.c:950:RFBindFunctions() Loading IFD Handler 3.0
00000017 ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 10000, device: usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if2
00000009 ccid_usb.c:302:OpenUSBByName() Using: /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Info.plist
00000881 ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau@free.fr)
00000007 ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver
00000006 ccid_usb.c:322:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.
00000208 ccid_usb.c:547:OpenUSBByName() USB device 1/5 already in use. Checking next one.
00000225 ccid_usb.c:799:OpenUSBByName() Device not found?
00000004 ifdhandler.c:150:CreateChannelByNameOrChannel() failed
00000006 readerfactory.c:1106:RFInitializeReader() Open Port 0x200002 Failed (usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if2)
00000008 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed.
00000006 readerfactory.c:610:RFRemoveReader() UnrefReader() count was: 1
00000006 readerfactory.c:1126:RFUnInitializeReader() Attempting shutdown of Yubico YubiKey OTP+FIDO+CCID 01 00.
04997700 ifdhandler.c:1154:IFDHPowerICC() action: PowerDown, usb:1050/0407:libhal:/org/freedesktop/Hal/devices/usb_device_1050_0407_serialnotneeded_if0 (lun: 0)
00000153 eventhandler.c:482:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
Which makes me wonder, s the /hal/ thing looks like an interface udev would provide here, but I do not run udev.
Looks like it's connected to app-crypt/ccid not playing nice without udev. I will look into it more.
Okay, so here are findings:
ccid library does use dlopen() during runtime to libudev if possible, and then uses it to poke USB devices. if I make ccid being unable to find libudev, which I keep around for some broken software that requires it during link time, but do not run it, it fails. I will follow it up with ccid authors. Thanks for support!
Update: my testing method was flawed. It was not about udev per se, but about the /dev/bus/usb/ ownershiop. By default pcscd was running as it's own user and for debug I was running it as root in foreground with all logs to stdout. That was root cause. pcscd was in fact unable to open the yubikey device.
I am unable to get oath working with Yubikey 4
Versions:
The output
I can use other features like otp just fine.
And if I specify the device by ID from the info, I am getting
Any idea how to debug it?