mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-29 13:48:07 -05:00
gpg-interface: trim CR from ssh-keygen -Y find-principals
We need to trim \r from the output of 'ssh-keygen -Y find-principals' on Windows, or we end up calling 'ssh-keygen -Y verify' with a bogus signer identity. ssh-keygen.c:2841 contains a call to puts(3), which confirms this hypothesis. Signature verification passes with the fix. Signed-off-by: pedro martelletto <pedro@yubico.com>
This commit is contained in:
committed by
Johannes Schindelin
parent
107be938e5
commit
1383ae5f12
@@ -509,7 +509,7 @@ static int verify_ssh_signed_buffer(struct signature_check *sigc,
|
||||
if (!*line)
|
||||
break;
|
||||
|
||||
trust_size = strcspn(line, "\n");
|
||||
trust_size = strcspn(line, "\r\n");
|
||||
principal = xmemdupz(line, trust_size);
|
||||
|
||||
child_process_init(&ssh_keygen);
|
||||
|
||||
Reference in New Issue
Block a user