Wed, Apr 1
Great spotting! This was it. Quite embarrassing that I've looked at this code so many time yet it didn't cross my mind to double check arguments order.
@jpalus You are right.
computed by ssh_signature_encoder_rsa, including additional 0, reach:
Tue, Mar 31
Note that exactly same data and length computed by ssh_signature_encoder_rsa, including additional 0, reach:
https://github.com/openssh/openssh-portable/blob/V_10_2_P1/sshkey.c#L517-L537
Let's see whether Niibe-san still remembers the T7882 case.
Added to some debug logging and whenever login issue occurs new logic is applied:
https://github.com/gpg/gnupg/blob/bc7c91bee521e4adf3506ca32bf34177b84ce1c5/agent/command-ssh.c#L1482
Looks like indeed related to T7882. After reverting c7e0ec12609b401ea81c4851522d86eb5ec27170 I was able to make 2000 connections without any issue. Bringing the change back and retrying issue appeared within first 300.
I've already tried with verbose which gave no errors. That's why I moved to debug logging. With double verbose I don't see anything wrong either. Excerpt from log for relevant 100 connections among which 1 failed:
$ cat gpg.log | sed 's/.*gpg-agent\[[0-9]*\] //' | # remove date, time and process id grep -v 'ssh handler .* \(started\|terminated\)' | # appears to be mostly noise wit hex address sort|uniq -c 80 new connection to /usr/libexec/gnupg2/scdaemon daemon established 20 new connection to /usr/libexec/gnupg2/scdaemon daemon established (reusing) 100 received ssh request of length 1 100 received ssh request of length 208 100 received ssh request of length 748 100 sending ssh response of length 1 100 sending ssh response of length 281 100 sending ssh response of length 626 100 ssh request handler for extension (27) ready 100 ssh request handler for extension (27) started 100 ssh request handler for request_identities (11) ready 100 ssh request handler for request_identities (11) started 100 ssh request handler for sign_request (13) ready 100 ssh request handler for sign_request (13) started 100 ssh-agent extension 'session-bind@openssh.com' not supported 100 ssh-agent extension 'session-bind@openssh.com' received
You need to get a log form gpg-agent. Put this into ~/.gnupg/gpg-agent/conf
Mon, Mar 23
But the original patch rG1b4ac98de7db: agent: Accept a trustlist with a missing LF at the end. was not working to allow missing newlines in gpg4win-5.0.0 @ win11?
Thu, Mar 19
That change is too complex for just getting a proper error message. The original patch covers the most common case.
This should also be fixed in 2.2 and 2.4 (if neccessary)
It seems that pinentry-curses defaults to "OK".
(my branch for GTK-4, same.)
Wed, Mar 18
Cancel (in pinentry-qt) was made default with rP291089ed476d75c71ef1984a7c081d27e357437d. Marc's ChangeLog entry was
- qt4/main.cpp: (qt_cmd_handler) make Cancel the default button for CONFIRM
Mar 3 2026
Looks good to me on gpg4win-5.0.2-beta2 @ win11:
- first manual gpg -K and gpgsm -K displays the correct output now
- the loop ran without a hang for 50 times
Feb 27 2026
I found that it's not that simple to accept the case of no newline at the end.
Because we need to handle the edge case where no newline occurs at the maximum buffer length, too.
It's something like the following.
Feb 26 2026
Feb 19 2026
Feb 4 2026
I found two issues in libgpg-error for spawning functions.
Feb 2 2026
Oh yeah, the mentioned patch is bogus because it assumes that fgets has already set the eof flag while reading the last line. This seems not to be the case.
Jan 30 2026
I added the gpgsm log output in the description (same error as in the gpg log)
Jan 27 2026
Jan 26 2026
To reproduce the hang, a loop will suffice (usually happens within the first 15 times, once it needed 50 runs):
Jan 23 2026
Jan 21 2026
Jan 20 2026
I have this fix committed to my working directory:
We have no CVE yet. However, CVE is also a good tag for security bugs,
On 2026-01-20, I found the message to security@gnupg.org of:
Message-ID: 4e708880-04ac-45bc-8d16-6b585f2652a1n@aisle.com
in may spam folder. It has a 10MB long attachment. That might be one of reasons to be identified as a spam.
Jan 13 2026
Jan 9 2026
This does not happen any more, tested with Gpg4win-5.0.0-beta479
