Skip to content
This repository was archived by the owner on Feb 16, 2022. It is now read-only.

Fix gpg signature generation for tag and simplify signed data#16

Open
alexey-igrychev wants to merge 1 commit into
hashbang:masterfrom
werf:fix_gpg_signature_generation_for_tag
Open

Fix gpg signature generation for tag and simplify signed data#16
alexey-igrychev wants to merge 1 commit into
hashbang:masterfrom
werf:fix_gpg_signature_generation_for_tag

Conversation

@alexey-igrychev
Copy link
Copy Markdown

@alexey-igrychev alexey-igrychev commented Apr 27, 2021

The creation of this PR is motivated by the lack of tagging support (it is possible to sign a linked commit) and the overly complicated data that is signed.

It is suggested to use object ID (commit ID or tag object ID) instead of HEAD commit ID as the git note object ID.

It is also proposed to use object ID as the data to be signed. In this case, verification is simplified and the user does not need to use a utility for verification (the user can implement the verification with whatever, wherever and however he wants).

These changes break compatibility with previous versions and the version must be changed.

Copy link
Copy Markdown
Member

@daurnimator daurnimator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Use tag object ID instead of head commit as git note object ID

  • Use note object ID as signed data

Is there a rationale for this written up somewhere?

Comment thread bin/git-signatures
git -c diff.indentHeuristic=false diff-tree -p "$1"..HEAD \
| git patch-id --stable \
| cut -d' ' -f1
printf "%s" "$(git show-ref "$1" -s)"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless printf?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In such a way, I would like to sign the object ID without the new line character.

- Use tag object ID instead of head commit as git note object ID
- Use note object ID as signed data
@alexey-igrychev alexey-igrychev force-pushed the fix_gpg_signature_generation_for_tag branch from 1a205c2 to 64b05ac Compare May 4, 2021 12:54
@alexey-igrychev
Copy link
Copy Markdown
Author

@daurnimator First of all, thank you very much for the repository and ready-to-use workflow.

I want to integrate this utility (and approach in general) with other tools to organize internal processes.
I have updated the PR description and am ready to continue the discussion and contribution if necessary.

@alexey-igrychev
Copy link
Copy Markdown
Author

@daurnimator I apologize for the direct appeal, but could you please give feedback.
It is essential to understand if I am going in the right direction or not.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants