]> git.ipfire.org Git - thirdparty/git.git/commit - gpg-interface.c
gpg-interface: trim CR from ssh-keygen
authorFabian Stelzer <fs@gigacodes.de>
Fri, 7 Jan 2022 09:07:35 +0000 (10:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Jan 2022 21:42:49 +0000 (13:42 -0800)
commitcaeef01ea73ba126a6cd4dbf4a4564ecdca9a32c
treefb3508b9e4204d89f3776a14c3f5aa719e7803b9
parente83ba647f7c61cf945690d6a0bd8c172a6498dc8
gpg-interface: trim CR from ssh-keygen

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.

Helped-by: Pedro Martelletto <pedro@yubico.com>
Signed-off-by: Fabian Stelzer <fs@gigacodes.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gpg-interface.c