-
Notifications
You must be signed in to change notification settings - Fork 822
Open
Labels
enhancementNew feature or requestNew feature or requestno-autocloseIssues/PRs to be ignored by stale botIssues/PRs to be ignored by stale bot
Description
As git
started to support SSH signing since yesterday, I am polling interest to start supporting this in go-git
. While we are at it, it would likely be beneficial to add support for x509 signed commits as well (possible using e.g. smimesign
).
Changes required, based on a quick analysis:
- Detect signature "headers" other than PGP in
go-git/plumbing/object/commit.go
Line 170 in bd662b0
func (c *Commit) Decode(o plumbing.EncodedObject) (err error) { Line 138 in bd662b0
if bytes.Contains(data, []byte(beginpgp)) {
- Ensure the signatures are made available in
Commit
andTag
- Adapt
Verify
logic to work with multiple signature types.
The latter seems to be the hardest part, as the current contract assumes an armored key ring. One way to make this backwards compatible would be to just assume the string data is the correct data to verify the type, but I am open to alternatives.
lafriks, bensallen, melvincarvalho, stefanprodan, pjbgf and 23 moremelvincarvalho, pjbgf, dakky and baksetercx
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestno-autocloseIssues/PRs to be ignored by stale botIssues/PRs to be ignored by stale bot