You are not logged in.

#1 2023-05-26 01:15:02

Lindenk
Member
Registered: 2013-07-09
Posts: 9

[Solved] GnuPG hangs for 15 seconds when using secret key

Hello!

For about the last month or two, attempting to use my secret key causes whatever process is using it to hang for exactly 15 seconds.

This includes:
- `pass`
- `ssh` (with SSH_AUTH_SOCK set to `/run/user/$UID/gnupg/S.gpg-agent.ssh`)
- git when signing or push/pulling
- manually signing a file with `gpg --sign`

It doesn't appear to be an issue when:
- running `gpg -K`.
- doing any of the above on my laptop with presumably the same configuration. This seems to be an issue even when and forcing it to recreate it's database,

It's still an issue after deleting `~/.gnupg` to force the database to recreate itself and also happens when using any of the above tools with any user on the system including root

I ran gpg-agent with `gpg-agent --daemon --log-file gnupg.log --debug-level guru` and the logs seem to indicate looking for a smart card and not finding one (I don't have a smart card, and tried this with only my keyboard and mouse connected to no avail):

Running `ssh-add -L`
```
2023-05-25 21:10:11 gpg-agent[41520] listening on socket '/run/user/1000/gnupg/S.gpg-agent'
2023-05-25 21:10:11 gpg-agent[41520] listening on socket '/run/user/1000/gnupg/S.gpg-agent.extra'
2023-05-25 21:10:11 gpg-agent[41520] listening on socket '/run/user/1000/gnupg/S.gpg-agent.browser'
2023-05-25 21:10:11 gpg-agent[41520] listening on socket '/run/user/1000/gnupg/S.gpg-agent.ssh'
2023-05-25 21:10:11 gpg-agent[41522] gpg-agent (GnuPG) 2.2.41 started
2023-05-25 21:10:15 gpg-agent[41522] DBG: agent_cache_housekeeping
2023-05-25 21:10:19 gpg-agent[41522] DBG: agent_cache_housekeeping
2023-05-25 21:10:22 gpg-agent[41522] ssh handler 0x7fee1b5ff6c0 for fd 10 started
2023-05-25 21:10:22 gpg-agent[41522] ssh request handler for request_identities (11) started
2023-05-25 21:10:22 gpg-agent[41522] no running SCdaemon - starting it
2023-05-25 21:10:22 gpg-agent[41522] DBG: chan_11 <- OK GNU Privacy Guard's Smartcard server ready
2023-05-25 21:10:22 gpg-agent[41522] DBG: first connection to SCdaemon established
2023-05-25 21:10:22 gpg-agent[41522] DBG: chan_11 -> GETINFO socket_name
2023-05-25 21:10:22 gpg-agent[41522] DBG: chan_11 <- D /run/user/1000/gnupg/S.scdaemon
2023-05-25 21:10:22 gpg-agent[41522] DBG: chan_11 <- OK
2023-05-25 21:10:22 gpg-agent[41522] DBG: additional connections at '/run/user/1000/gnupg/S.scdaemon'
2023-05-25 21:10:22 gpg-agent[41522] DBG: chan_11 -> OPTION event-signal=12
2023-05-25 21:10:22 gpg-agent[41522] DBG: chan_11 <- OK
2023-05-25 21:10:22 gpg-agent[41522] DBG: chan_11 -> SERIALNO
2023-05-25 21:10:23 gpg-agent[41522] DBG: agent_cache_housekeeping
2023-05-25 21:10:27 gpg-agent[41522] DBG: agent_cache_housekeeping
2023-05-25 21:10:31 gpg-agent[41522] DBG: agent_cache_housekeeping
2023-05-25 21:10:35 gpg-agent[41522] DBG: agent_cache_housekeeping
2023-05-25 21:10:38 gpg-agent[41522] DBG: chan_11 <- ERR 100696144 No such device <SCD>
2023-05-25 21:10:38 gpg-agent[41522] ssh request handler for request_identities (11) ready
2023-05-25 21:10:38 gpg-agent[41522] DBG: chan_11 -> RESTART
2023-05-25 21:10:38 gpg-agent[41522] DBG: chan_11 <- OK
2023-05-25 21:10:38 gpg-agent[41522] ssh handler 0x7fee1b5ff6c0 for fd 10 terminated
2023-05-25 21:10:39 gpg-agent[41522] DBG: agent_cache_housekeeping
```

I don't think I've installed or have anything smart card related running, based on the wiki I doubled checked `pcscd` wasn't running and that neither ccid and opensc are installed.

Anyone have any ideas? I'm honestly stumped

Last edited by Lindenk (2023-05-26 04:19:41)

Offline

#2 2023-05-26 04:18:58

Lindenk
Member
Registered: 2013-07-09
Posts: 9

Re: [Solved] GnuPG hangs for 15 seconds when using secret key

Looks like I missed a usb cable. Apparently it's possible for some usb devices to incorrectly be considered smart cards and cause issues like this. If anyone has a solution for stopping gpg from looking at incorrect devices, that would also be great

Offline

Board footer

Powered by FluxBB