Skip to content
This repository has been 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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexey-igrychev
Copy link

@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
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?

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
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
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
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
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