This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
forked from golang/crypto
-
Notifications
You must be signed in to change notification settings - Fork 20
openpgp: another rewrite of UID/self-sig parsing #5
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- In this rewrite, we're not making a subloop for consuming signatures after reading a UID; we're just dropping into the loop that's already in place. We'll look for a self-sig so long as there's not a valid self-sig already consumed. We only take the UserID as valid once we find a valid self-signature. Otherwise, we'll just silently drop that UserID. - This should fix CORE-2344, and there's a test case for it that now works. - Also add another test case for Keys without any valid UIDs.
@oconnor663 can you take a look at this? We should discuss it in person, since it's subtle, and I'm not 100% convinced it's correct. |
(This is a fix for keybase/client#1685) |
In my entirely unqualified opinion, this change looks good. |
@@ -353,33 +353,22 @@ EachPacket: | |||
current = new(Identity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're at it, could we comment the shit out of all of these cases? :-D
maxtaco
added a commit
that referenced
this pull request
Jan 11, 2016
openpgp: another rewrite of UID/self-sig parsing
maxtaco
added a commit
to keybase/client
that referenced
this pull request
Jan 11, 2016
- via vendored PR keybase/go-crypto#5
This was referenced Jan 11, 2016
MarcoPolo
pushed a commit
to keybase/client
that referenced
this pull request
Jan 13, 2016
- via vendored PR keybase/go-crypto#5
@maxtaco Do I have your permission to upstream this fix? |
Yes! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
we're just dropping into the loop that's already in place. We'll look for a self-sig
so long as there's not a valid self-sig already consumed. We only take the UserID as valid
once we find a valid self-signature. Otherwise, we'll just silently drop that UserID.