This repository was archived by the owner on Jul 18, 2025. It is now read-only.
Repository navigation
Provide methods to disassemble signatures in JWS - #49
Merged
dmcgowan merged 3 commits intoJan 14, 2015
Merged
Conversation
This change stabilizes the order in which signatures are written to json when multiple signatures are present. The signatures are sorted by key id then the actual signature bytes. Signed-off-by: Stephen J Day <[email protected]>
This adds (*JSONSignature).Signatures and modifies NewJSONSignature to allow working with individual signature blobs. The blobs can be pulled off of a signature, stored separately then merged back together. The signatures are transported as byte slices. Signed-off-by: Stephen J Day <[email protected]>
To simplify the code, some pointer type fields have been removed where it makes sense. Doing so should reduce the number of scattered heap allocations and simplify areas where we copy into a struct. There is probably more work that can be done to get the benefits of this change. Signed-off-by: Stephen J Day <[email protected]>
|
LGTM |
Contributor
|
Not fond of the update to NewJSONSignature but don't really think its worth getting caught up on if it doesn't break existing uses. LGTM |
|
LGTM |
dmcgowan
added a commit
that referenced
this pull request
Jan 14, 2015
Provide methods to disassemble signatures in JWS
Contributor
Author
|
@dmcgowan I don't like it either. We probably need to re-vamp the public API to support these use cases now that we have a better handle over them. |
This file contains hidden or 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
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.
This adds (*JSONSignature).Signatures and modifies NewJSONSignature to allow working with individual signature blobs. The blobs can be pulled off of a signature, stored separately then merged back together. The signatures are transported as byte slices. This should support the changes required in distribution/distribution#25.
This change also stabilizes the order in which signatures are written to json when multiple signatures are present. The signatures are sorted by key id then the actual signature bytes.
To simplify the code, some pointer type fields have been removed where it makes sense. Doing so should reduce the number of scattered heap allocations and simplify areas where we copy into a struct.