This has recently started after I updated to Windows 10 1803 (x64). I have updated Gpg4Win to the latest version (3.1.2), but this has not fixed anything.
I have tried the following:
- Remove the Minidriver (https://forum.yubico.com/viewtopicbe08.html?f=35&t=2756)
- Change the chuid (https://forum.yubico.com/viewtopicb199.html?f=35&t=2757)
- Uninstall all drivers related to the Yubikey so they get reinstalled using Nirsoft's Usbdeview
- Remove the entries for the Yubikey from
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Calais\SmartCards - Disable and re-enable the CCID interface using Yubico's tools
- Restart the Smartcard service
- Kill and restart scdaemon and gpg-connect-agent
- (obviously) reboot
None of this fixed it, and I am pretty much out of ideas at this moment. This is the only smartcard reader on my machine (aside from a TPM), and the Yubikey has been tested to work with gpg on Linux.
The Yubikey is showing as Identity Device (NIST SP 800-73 [PIV])
Some logs:
Gpg returns:
$ gpg --card-status
gpg: selecting openpgp failed: No such device
gpg: OpenPGP card not available: No such device
Certutil returns:
$ certutil -scinfo
=======================================================
Analyzing card in reader: Yubico Yubikey 4 OTP+U2F+CCID 0
--------------===========================--------------
================ Certificate 0 ================
--- Reader: Yubico Yubikey 4 OTP+U2F+CCID 0
--- Card: Identity Device (NIST SP 800-73 [PIV])
Provider = Microsoft Base Smart Card Crypto Provider
Key Container = (null) [Default Container]
Cannot open the AT_SIGNATURE key for reader: Yubico Yubikey 4 OTP+U2F+CCID 0
Cannot open the AT_KEYEXCHANGE key for reader: Yubico Yubikey 4 OTP+U2F+CCID 0
--------------===========================--------------
================ Certificate 0 ================
--- Reader: Yubico Yubikey 4 OTP+U2F+CCID 0
--- Card: Identity Device (NIST SP 800-73 [PIV])
Provider = Microsoft Smart Card Key Storage Provider
Key Container = (null) [Default Container]
Cannot open the key for reader: Yubico Yubikey 4 OTP+U2F+CCID 0
--------------===========================--------------
Done.
CertUtil: -SCInfo command completed successfully.
The log by Scdaemon shows something (I think) might be interesting, as it seems to detect the reader:
2018-07-26 18:13:36 scdaemon[13612] detected reader 'Windows Hello for Business 9'
2018-07-26 18:13:36 scdaemon[13612] detected reader 'Yubico Yubikey 4 OTP+U2F+CCID 0'
2018-07-26 18:13:36 scdaemon[13612] reader slot 0: not connected
2018-07-26 18:13:36 scdaemon[13612] DBG: leave: apdu_open_reader => slot=0 [pc/sc]
2018-07-26 18:13:36 scdaemon[13612] DBG: enter: apdu_connect: slot=0
2018-07-26 18:13:36 scdaemon[13612] pcsc_control failed: insufficient buffer (0x80100008)
2018-07-26 18:13:36 scdaemon[13612] pcsc_vendor_specific_init: GET_FEATURE_REQUEST failed: 65538
2018-07-26 18:13:36 scdaemon[13612] reader slot 0: active protocol: T1
2018-07-26 18:13:36 scdaemon[13612] slot 0: ATR=3B 8D 01 80 FB A0 00 00 03 97 42 54 46 59 04 01 CF
2018-07-26 18:13:36 scdaemon[13612] DBG: pcsc_get_status_change: changed present excl inuse
2018-07-26 18:13:36 scdaemon[13612] DBG: leave: apdu_connect => sw=0x0
2018-07-26 18:13:36 scdaemon[13612] DBG: send apdu: c=00 i=A4 p1=00 p2=0C lc=2 le=-1 em=0
2018-07-26 18:13:36 scdaemon[13612] DBG: PCSC_data: 00 A4 00 0C 02 3F 00
2018-07-26 18:13:36 scdaemon[13612] DBG: response: sw=6A82 datalen=0
2018-07-26 18:13:36 scdaemon[13612] DBG: send apdu: c=00 i=A4 p1=04 p2=00 lc=6 le=-1 em=0
2018-07-26 18:13:36 scdaemon[13612] DBG: PCSC_data: 00 A4 04 00 06 D2 76 00 01 24 01
2018-07-26 18:13:36 scdaemon[13612] DBG: response: sw=6A82 datalen=0
2018-07-26 18:13:36 scdaemon[13612] can't select application 'openpgp': Not supported
2018-07-26 18:13:36 scdaemon[13612] DBG: enter: apdu_close_reader: slot=0
2018-07-26 18:13:36 scdaemon[13612] DBG: enter: apdu_disconnect: slot=0
2018-07-26 18:13:36 scdaemon[13612] DBG: leave: apdu_disconnect => sw=0x0
2018-07-26 18:13:36 scdaemon[13612] DBG: leave: apdu_close_reader => 0x0 (close_reader)
2018-07-26 18:13:36 scdaemon[13612] DBG: chan_0x00000188 -> ERR 100696144 No such device <SCD>
