[...]
So, I guess, @ametzler1's suggestion to remove the check for isX11SessionType is the correct solution. DISPLAY=invalid would still not work, but I think that's acceptable.
In T8156#216401, @ikloecker wrote:I'm not sure if we should consider env DISPLAY=invalid pinentry-qt a valid test.
[...]
So, I guess, @ametzler1's suggestion to remove the check for isX11SessionType is the correct solution. DISPLAY=invalid would still not work, but I think that's acceptable.
Here is my attempt for fixing the de-vs compliance check when verifying a signature:
Most sane place to fix this is in mimetreeparser / libkleo:
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:
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
2.2.53 was released wit VSD 3.3.6
Let's see whether Niibe-san still remembers the T7882 case.
Can you please test the patch below in your environment. That would be helpful.
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