Yubico / libykneomgr

YubiKey NEO CCID Manager C Library
https://developers.yubico.com/libykneomgr/
GNU Lesser General Public License v3.0
11 stars 11 forks source link

Neo not detected after switching to mode 4/5/6 #20

Closed spectralblu closed 10 years ago

spectralblu commented 10 years ago

After I set my Neo to mode 6 (OTP + CCID + U2F) as listed in the documentation, it is no longer detected by the ykneomgr

libykneomgr-0.1.6-mac/bin $ ykneomgr -m
> 01
libykneomgr-0.1.6-mac/bin $ ykneomgr -l
> 0: Yubico Yubikey NEO CCID

libykneomgr-0.1.6-mac/bin $ ykneomgr -M 6
libykneomgr-0.1.6-mac/bin $ ykneomgr -m
> 06

# Unplug and replug Neo to reinitialize USB device
libykneomgr-0.1.6-mac/bin $ ykneomgr -m
> error: ykneomgr_discover_match (-2): No device found

The Yubico Neo Manager (gui) app does still detect the Neo, and I am able to set the mode back to other modes.

Having similar issues with the other apps detecting the Neo after switching to mode 6, such as YubiOath and the YubiKey Personalization tool.

klali commented 10 years ago

For mode 5 & 6 to work with libykneomgr (over ccid) you need to have libccid 1.4.18 installed (this is at least a possible explanation)

/klas

spectralblu commented 10 years ago

I just installed libccid 1.4.18, as well as pcsclite 1.8.12 from https://alioth.debian.org/frs/?group_id=30105.

The Neo is still not detected by ykneomgr. How can I verify the correct installation of libccid 1.4.18 is being picked up?

klali commented 10 years ago

Hello,

The change that comes with libccid 1.4.18 that is relevant for more Neo modes is in /etc/libccid_Info.plist after installing 1.4.18 you should find something like:

$ cat /etc/libccid_Info.plist | grep Yubico

Yubico Yubikey NEO OTP+CCID
            <string>Yubico Yubikey NEO CCID</string>
            <string>Yubico Yubikey NEO U2F+CCID</string>
            <string>Yubico Yubikey NEO OTP+U2F+CCID</string>

For the new libccid to be in usage pcscd should probably be restarted.

/klas

spectralblu commented 10 years ago

Hm, I'm not seeing that file in that location.

I'm running 10.10 (Yosemite):

I downloaded pcsclite 1.8.12 from the website, untar'd and then ran a

tar xzvf pcsc-lite-1.6.2.tar.bz2
./configure
make
sudo make install

I downloaded libccid 1.4.18, untar'd, and ran the same

tar xzvf ccid-1.4.18.tar.bz2
./configure
make
sudo make install

I downloaded pcsc-lite because the configure step for ccid was complaining about an out of date pcsc-lite.

That said, I do see something that looks like what you're specifying in /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist...

klali commented 10 years ago

ah. I (for some reason) assumed you where running linux. On mac it's a bit of a hassle to replace libccid with a newer version. With your installation it's probably still running the shipped pcscd libccid from the system, you can find that Info.plist in /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist you could try just copying the new one over it.

spectralblu commented 10 years ago

Sweet! Thanks a lot! Copying over that plist file from /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist to /usr/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist did the trick! Also got Yubico Authenticator working as well. Should I close this (and the other associated) issue?

klali commented 10 years ago

Yes please =)

The yubikey-neo-manager and yubico-authenticator-desktop projects try to do a few tricks with that file, however not working on 10.10 (yet?)

/klas