Hi,
Thanks for developing this fantastic project.
I'm running GnuPG under macOS Big Sur 11.2.3 and recently upgraded to GPG 2.3.1 via Homebrew. After the upgrade, my YubiKey stopped working and it seems that there are some permission issues in scdaemon.
GPG output:
$ gpgconf --kill all $ gpg --card-status -vvv gpg: using character set 'utf-8' gpg: Note: RFC4880bis features are enabled. gpg: no running gpg-agent - starting '/usr/local/Cellar/gnupg/2.3.1/bin/gpg-agent' gpg: waiting for the agent to come up ... (5s) gpg: connection to the agent established gpg: selecting card failed: Operation not supported by device gpg: OpenPGP card not available: Operation not supported by device
gpg-agent logs (debug-all):
2021-04-23 14:10:09 gpg-agent[15443] listening on socket '/Users/frederick/.gnupg/S.gpg-agent' 2021-04-23 14:10:09 gpg-agent[15443] listening on socket '/Users/frederick/.gnupg/S.gpg-agent.extra' 2021-04-23 14:10:09 gpg-agent[15443] listening on socket '/Users/frederick/.gnupg/S.gpg-agent.browser' 2021-04-23 14:10:09 gpg-agent[15443] listening on socket '/Users/frederick/.gnupg/S.gpg-agent.ssh' 2021-04-23 14:10:09 gpg-agent[15444] gpg-agent (GnuPG) 2.3.1 started 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> OK Pleased to meet you, process 15442 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- RESET 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- OPTION ttyname=/dev/ttys013 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- OPTION ttytype=tmux-256color 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- OPTION lc-ctype=en_AU.UTF-8 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- OPTION lc-messages=en_AU.UTF-8 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- GETINFO version 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> D 2.3.1 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- OPTION allow-pinentry-notify 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- OPTION agent-awareness=2.1.0 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- SCD GETINFO version 2021-04-23 14:10:09 gpg-agent[15444] no running /usr/local/Cellar/gnupg/2.3.1/libexec/scdaemon daemon - starting it 2021-04-23 14:10:09 gpg-agent[15444] DBG: agent_flush_cache (pincache only) 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 <- OK GNU Privacy Guard's Smartcard server ready 2021-04-23 14:10:09 gpg-agent[15444] first connection to daemon /usr/local/Cellar/gnupg/2.3.1/libexec/scdaemon established 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 -> GETINFO socket_name 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 <- D /Users/frederick/.gnupg/S.scdaemon 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 <- OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: additional connections at '/Users/frederick/.gnupg/S.scdaemon' 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 -> OPTION event-signal=31 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 <- OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 -> GETINFO version 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 <- D 2.3.1 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 <- OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> D 2.3.1 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- SCD SERIALNO 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 -> SERIALNO 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 <- ERR 100696144 Operation not supported by device <SCD> 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 -> ERR 100696144 Operation not supported by device <SCD> 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_8 <- [eof] 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 -> RESTART 2021-04-23 14:10:09 gpg-agent[15444] DBG: chan_9 <- OK 2021-04-23 14:10:13 gpg-agent[15444] DBG: agent_cache_housekeeping 2021-04-23 14:10:17 gpg-agent[15444] DBG: agent_cache_housekeeping 2021-04-23 14:10:21 gpg-agent[15444] DBG: agent_cache_housekeeping 2021-04-23 14:10:25 gpg-agent[15444] DBG: agent_cache_housekeeping 2021-04-23 14:10:29 gpg-agent[15444] DBG: agent_cache_housekeeping 2021-04-23 14:10:33 gpg-agent[15444] DBG: agent_cache_housekeeping 2021-04-23 14:10:37 gpg-agent[15444] DBG: agent_cache_housekeeping 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK Pleased to meet you, process 16774 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- RESET 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- OPTION ttytype=tmux-256color 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- GETINFO tpm2d_running 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> ERR 67109144 IPC parameter error <GPG Agent> - unknown value for WHAT 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- [eof] 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK Pleased to meet you, process 16775 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- RESET 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- OPTION ttytype=tmux-256color 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- GETINFO scd_running 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- scd killscd 2021-04-23 14:10:41 gpg-agent[15444] new connection to /usr/local/Cellar/gnupg/2.3.1/libexec/scdaemon daemon established (reusing) 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_9 -> killscd 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_9 <- OK closing connection 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- [eof] 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_9 -> RESTART 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_9 <- [eof] 2021-04-23 14:10:41 gpg-agent[15444] daemon /usr/local/Cellar/gnupg/2.3.1/libexec/scdaemon finished (status 2) 2021-04-23 14:10:41 gpg-agent[15444] DBG: agent_flush_cache (pincache only) 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK Pleased to meet you, process 16776 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- RESET 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- OPTION ttytype=tmux-256color 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 <- KILLAGENT 2021-04-23 14:10:41 gpg-agent[15444] DBG: chan_8 -> OK closing connection 2021-04-23 14:10:41 gpg-agent[15444] random usage: poolsize=600 mixed=0 polls=0/0 added=0/0 outmix=0 getlvl1=0/0 getlvl2=0/0 2021-04-23 14:10:41 gpg-agent[15444] secmem usage: 0/32768 bytes in 0 blocks
scdaemon logs (debug-level guru):
2021-04-23 14:10:09 scdaemon[15445] listening on socket '/Users/frederick/.gnupg/S.scdaemon' 2021-04-23 14:10:09 scdaemon[15445] handler for fd -1 started 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 -> OK GNU Privacy Guard's Smartcard server ready 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 <- GETINFO socket_name 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 -> D /Users/frederick/.gnupg/S.scdaemon 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 -> OK 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 <- OPTION event-signal=31 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 -> OK 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 <- GETINFO version 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 -> D 2.3.1 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 -> OK 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 <- SERIALNO 2021-04-23 14:10:09 scdaemon[15445] DBG: apdu_open_reader: BAI=141102 2021-04-23 14:10:09 scdaemon[15445] DBG: apdu_open_reader: new device=141102 2021-04-23 14:10:09 scdaemon[15445] ccid open error: skip 2021-04-23 14:10:09 scdaemon[15445] check permission of USB device at Bus 020 Device 017 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 -> ERR 100696144 Operation not supported by device <SCD> 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 <- RESTART 2021-04-23 14:10:09 scdaemon[15445] DBG: chan_7 -> OK 2021-04-23 14:10:41 scdaemon[15445] DBG: chan_7 <- killscd 2021-04-23 14:10:41 scdaemon[15445] DBG: chan_7 -> OK closing connection