Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpg-interface: trim CR from ssh-keygen -Y find-principals #3561

Merged
merged 1 commit into from
Nov 27, 2021
Merged

gpg-interface: trim CR from ssh-keygen -Y find-principals #3561

merged 1 commit into from
Nov 27, 2021

Conversation

martelletto
Copy link

It looks like we need to trim \r from the output of ssh-keygen -Y find-principals's on Windows, or we end up calling ssh-keygen -Y verify with a bogus signer identity, as per screenshot. ssh-keygen.c:2841 seems to confirm this hypothesis. Signature verification passes with the fix.

Apologies if this isn't the appropriate forum, and thank you for your work on Git for Windows!

-p.

screenshot

@dscho
Copy link
Member

dscho commented Nov 26, 2021

It looks like we need to trim \r from the output of ssh-keygen -Y find-principals's on Windows, or we end up calling ssh-keygen -Y verify with a bogus signer identity, as per screenshot. ssh-keygen.c:2841 seems to confirm this hypothesis. Signature verification passes with the fix.

That looks like good material to put into the commit message.

As the DCO bot pointed out, you also need to add your Signed-off-by: trailer.

So: please amend the commit message with git commit -s, providing a thorough commit message, and then force-push.

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>
@martelletto
Copy link
Author

Sure; done. Thanks for the feedback.

@dscho dscho added this to the Next release milestone Nov 27, 2021
@dscho dscho merged commit da054c1 into git-for-windows:main Nov 27, 2021
@dscho
Copy link
Member

dscho commented Nov 27, 2021

Thank you!

git-for-windows-ci pushed a commit that referenced this pull request Nov 27, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Nov 27, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Nov 27, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Nov 27, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
@dscho
Copy link
Member

dscho commented Nov 28, 2021

A new snapshot that includes the fix is now available.

git-for-windows-ci pushed a commit that referenced this pull request Nov 29, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
@martelletto martelletto deleted the trim-cr branch November 29, 2021 14:56
git-for-windows-ci pushed a commit that referenced this pull request Nov 29, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Nov 30, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Nov 30, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Nov 30, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Nov 30, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Dec 2, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
@djmdjm
Copy link

djmdjm commented Dec 2, 2021

There's also https://bugzilla.mindrot.org/show_bug.cgi?id=3094 to make the verifier more lenient

@dscho
Copy link
Member

dscho commented Dec 3, 2021

There's also https://bugzilla.mindrot.org/show_bug.cgi?id=3094 to make the verifier more lenient

This will help future OpenSSH versions, but we cannot assume that everybody upgrades immediately. So I think we did the right thing, merging this PR.

dscho added a commit that referenced this pull request Dec 3, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Dec 3, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Dec 3, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Dec 6, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Dec 6, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Dec 6, 2021
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Jan 16, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 16, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 17, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 17, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 19, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 19, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 19, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit to dscho/git that referenced this pull request Jan 19, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Jan 19, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Jan 19, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 19, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Jan 20, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 21, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 24, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
ldennington pushed a commit that referenced this pull request Jan 24, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 24, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 27, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 29, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 29, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit to dscho/git that referenced this pull request Jan 29, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 29, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
git-for-windows-ci pushed a commit that referenced this pull request Jan 29, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Feb 4, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Feb 7, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Feb 7, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Feb 8, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Feb 8, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Feb 15, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
dscho added a commit that referenced this pull request Feb 22, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
derrickstolee pushed a commit to microsoft/git that referenced this pull request Apr 12, 2022
gpg-interface: trim CR from ssh-keygen -Y find-principals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants