git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] verify-commit: scriptable commit signature verification

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jun 27, 2014, 13:50 UTC
Message-ID
<53AD76C3.3060702@drmicha.warpmail.net>
In-Reply-To
<53AD685A.1030401@drmicha.warpmail.net>
Michael J Gruber venit, vidit, dixit 27.06.2014 14:49:
Show 54 quoted lines
> Michael J Gruber venit, vidit, dixit 27.06.2014 14:31:
>> Jeff King venit, vidit, dixit 16.06.2014 22:39:
>>> On Mon, Jun 16, 2014 at 01:34:20PM -0700, Junio C Hamano wrote:
>>>
>>>>> Your middle example above did make me think of one other thing, though.
>>>>> As you noted, we actually have _three_ signature types:
>>>>>
>>>>>   1. signed tags
>>>>>
>>>>>   2. signed commits
>>>>>
>>>>>   3. merges with embedded mergetag headers
>>>>>
>>>>> We already have a tool for (1). Michael is adding a tool for (2). How
>>>>> would one check (3) in a similar way?
>>>>
>>>> Hmph, somehow I misread the patch that it was for both 2 & 3 X-<.
>>>
>>> I was just assuming it handles only (2) without checking further, so I
>>> may be wrong. But I do not think it makes sense to conflate (2) and (3).
>>> A merge commit may have both, and they are separate signatures.
>>>
>>> For that matter, is there a way to expose (3) currently, besides via
>>> --show-signature? It does not trigger "%GG" and friends (nor should it).
>>> It may make sense to add extra format specifiers for mergetag
>>> signatures. Though I do not use them myself, so I am not clear on what
>>> the use case is besides a manual, human verification of a particular
>>> merge.
>>
>> I'm afraid I'm on a weekly git schedule at best, sorry. Just trying to
>> catch up on this:
>>
>> Admittedly, I simply don't know about "3.". I know only 1. and 2. (and
>> don't remember why they are implemented differently).
>>
>> Are they documented/decribed somewhere?
>>
>> Meanwhile, I'm rebasing on top of the %G related patches by Junio and
>> Jeff and hope to send out a v4 later today.
>>
>> Michael
> 
> OK, found the two commits which "git log -Smergetag" outputs, but no tests.
> 
> A merge commit with embedded signed tag it is, then.
> 
> The commit could carry it's own commit signature, couldn't it?
> That would suggest that we use "git verify-tag" to verify the embedded
> signed tag of a merge commit and "git verify-commit" to verify the
> commit signature.
> 
> OTOH I would like these basic commands to be as strict as possible,
> including type-checks. Does that mean having "git verify-mergetag" which
> verifies that it is being used on a merge commit with embedded mergetag?

... or an extension <ref>^{mergetag} to our machinery, defaulting to the tag object containing the mergetag for the 2nd parent, with an optional version <ref>^{mergetag}<n>?

OTOH, verifying a mergetag involves both looking at the signed tag and the parent list of the commit. We probably should require signed (merge) tags on all but the first parent. Oh Can of Worms, oh Can of Worms ("Oh Can'o'Worms" to the tune of "Oh Canada").

Michael
Previous: Junio C HamanoNext: Junio C Hamano
Message 23 of 75 in “verify-commit: verify commit signatures”
  1. 0/3 verify-commit: verify commit signaturesMichael J Gruber, Jun 6, 2014
  2. 1/3 pretty: free the gpg status bufMichael J Gruber, Jun 6, 2014
  3. 2/3 gpg-interface: provide access to the payloadMichael J Gruber, Jun 6, 2014
  4. Jeff KingJun 13, 2014
  5. Michael J GruberJun 13, 2014
  6. Jeff KingJun 13, 2014
  7. 3/3 verify-commit: scriptable commit signature verificationMichael J Gruber, Jun 6, 2014
  8. Michael J GruberJun 11, 2014
  9. Jeff KingJun 13, 2014
  10. Michael J GruberJun 13, 2014
  11. Jeff KingJun 13, 2014
  12. Junio C HamanoJun 13, 2014
  13. Michael J GruberJun 16, 2014
  14. Jeff KingJun 16, 2014
  15. Junio C HamanoJun 16, 2014
  16. Jeff KingJun 16, 2014
  17. Michael J GruberJun 27, 2014
  18. Michael J GruberJun 27, 2014
  19. Michael J GruberJun 27, 2014
  20. log: correctly identify mergetag signature verification statusMichael J Gruber, Jun 27, 2014
  21. Jeff KingJun 28, 2014
  22. Junio C HamanoJul 10, 2014
  23. Michael J GruberJun 27, 2014
  24. Junio C HamanoJun 27, 2014
  25. Junio C HamanoJun 27, 2014
  26. Jeff KingJun 28, 2014
  27. Junio C HamanoJun 30, 2014
  28. 0/6 verify-commit: verify commit signaturesMichael J Gruber, Jun 13, 2014
  29. 0/5 verify-commit: verify commit signaturesMichael J Gruber, Jun 23, 2014
  30. Jeff KingJun 23, 2014
  31. Junio C HamanoJun 23, 2014
  32. Jeff KingJun 23, 2014
  33. Junio C HamanoJun 23, 2014
  34. 0/4 verify-commit: verify commit signaturesMichael J Gruber, Jun 27, 2014
  35. Junio C HamanoJun 27, 2014
  36. Jeff KingJun 28, 2014
  37. Jeff KingJun 28, 2014
  38. 1/4 gpg-interface: provide clear helper for struct signature_checkMichael J Gruber, Jun 27, 2014
  39. 2/4 gpg-interface: provide access to the payloadMichael J Gruber, Jun 27, 2014
  40. 3/4 verify-commit: scriptable commit signature verificationMichael J Gruber, Jun 27, 2014
  41. 4/4 t7510: test verify-commitMichael J Gruber, Jun 27, 2014
  42. Junio C HamanoJun 27, 2014
  43. Michael J GruberJun 27, 2014
  44. 1/5 gpg-interface: provide clear helper for struct signature_checkMichael J Gruber, Jun 23, 2014
  45. 2/5 gpg-interface: provide access to the payloadMichael J Gruber, Jun 23, 2014
  46. 3/5 verify-commit: scriptable commit signature verificationMichael J Gruber, Jun 23, 2014
  47. 4/5 t7510: exit for loop with test resultMichael J Gruber, Jun 23, 2014
  48. 5/5 t7510: test verify-commitMichael J Gruber, Jun 23, 2014
  49. Junio C HamanoJun 23, 2014
  50. 1/6 pretty: free the gpg status bufMichael J Gruber, Jun 13, 2014
  51. Jeff KingJun 13, 2014
  52. 2/6 gpg-interface: provide access to the payloadMichael J Gruber, Jun 13, 2014
  53. 3/6 verify-commit: scriptable commit signature verificationMichael J Gruber, Jun 13, 2014
  54. Jeff KingJun 13, 2014
  55. Michael J GruberJun 13, 2014
  56. Jeff KingJun 13, 2014
  57. Michael J GruberJun 13, 2014
  58. 4/6 t7510: exit for loop with test resultMichael J Gruber, Jun 13, 2014
  59. Jeff KingJun 13, 2014
  60. Michael J GruberJun 13, 2014
  61. Michael J GruberJun 13, 2014
  62. Michael J GruberJun 13, 2014
  63. Jeff KingJun 13, 2014
  64. Johannes SixtJun 13, 2014
  65. Michael J GruberJun 13, 2014
  66. Johannes SixtJun 13, 2014
  67. Jeff KingJun 13, 2014
  68. Michael J GruberJun 13, 2014
  69. Johannes SixtJun 13, 2014
  70. Junio C HamanoJun 13, 2014
  71. 5/6 t7510: test verify-commitMichael J Gruber, Jun 13, 2014
  72. Jeff KingJun 13, 2014
  73. Michael J GruberJun 13, 2014
  74. Junio C HamanoJun 13, 2014
  75. 6/6 gpg-interface: provide clear helper for struct signature_checkMichael J Gruber, Jun 13, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.