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

Re: [PATCHv3] gpg-interface: check gpg signature creation status

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jun 16, 2016, 11:30 UTC
Message-ID
<0a9d4b3b-6fc9-a539-0256-3eb09c4791c0@drmicha.warpmail.net>
In-Reply-To
<20160616092535.GA29954@sigill.intra.peff.net>
Jeff King venit, vidit, dixit 16.06.2016 11:25:
Show 13 quoted lines
> On Wed, Jun 15, 2016 at 09:17:54AM +0200, Michael J Gruber wrote:
> 
>> As for the flexibility:
>> We do code specifically for gpg, which happens to work for gpg2 also.
>> The patch doesn't add any gpg ui requirements that we don't require
>> elsewhere already.
>> More flexibility requires a completely pluggable approach - gpgsm
>> already fails to meet the gpg command line ui.
> 
> Does it? I haven't run it in production, but I did some tests with gpgsm
> a few months ago and found it to be a drop-in replacement, at least with
> respect to git. Though I don't think that matters one way or the other
> for the current discussion; it _does_ do --status-fd.
You are right!

I solely trusted in the documentation rather than simply trying it out. gpgsm even supports the undocumented short options.

Only the resulting header is different (plus the fact that I have to turn of crl checks for whatever reason).

Show 20 quoted lines
>> In any case, "status-fd" is *the* way to interface with gpg reliably
>> just like plumbing commands are *the* way to interface with git reliably.
> 
> Fair enough. I've generally found its exit code pretty reliable. It's
> unclear to me if the problem you saw was because gpg was exiting 0 but
> producing no signature, or if your debugging was masking its exit code.
> 
> Either way, I do not mind using --status-fd; it seems like it should be
> more robust in general. It's the tip commit in the series I'm about to
> post.
> 
>> As for the read locking:
>> I'm sorry I have no idea about that area at all. I thought that I'm
>> doing the same that we do for verify, but apparently not. My
>> strbuf_read-fu is not that strong either (read: copy&paste). I trust
>> your assessment completely, though.
> 
> Yeah, you're right that the deadlock thing is also a possibility on the
> verification side. I'm not sure whether it's possible to trigger in
> practice or not. See the analysis in the series.

With great admiration I've looked at your series which solves this problem at the root. Way above my head (the solution, not the root, fortunately).

Show 8 quoted lines
>> As for the original problem:
>> That had a different cause, as we know now (rebase dropping signatures
>> without hint). I still think we should check gpg status codes properly.
> 
> Yep, I agree.
> 
> -Peff
> 
Previous: Jeff KingNext: Jeff King
Message 22 of 31 in “I lost my commit signature”
  1. ZhenTianJun 14, 2016
  2. Jeff KingJun 14, 2016
  3. ZhenTianJun 14, 2016
  4. Jeff KingJun 14, 2016
  5. ZhenTianJun 14, 2016
  6. Jeff KingJun 14, 2016
  7. ZhenTianJun 14, 2016
  8. Michael J GruberJun 14, 2016
  9. gpg-interface: check gpg signature for correct headerMichael J Gruber, Jun 14, 2016
  10. Jeff KingJun 14, 2016
  11. Michael J GruberJun 14, 2016
  12. Michael J GruberJun 14, 2016
  13. [PATCHv2] gpg-interface: check gpg signature for correct headerMichael J Gruber, Jun 14, 2016
  14. [PATCHv3] gpg-interface: check gpg signature creation statusMichael J Gruber, Jun 14, 2016
  15. Junio C HamanoJun 14, 2016
  16. Jeff KingJun 14, 2016
  17. Jeff KingJun 14, 2016
  18. Junio C HamanoJun 14, 2016
  19. Jeff KingJun 15, 2016
  20. Michael J GruberJun 15, 2016
  21. Jeff KingJun 16, 2016
  22. Michael J GruberJun 16, 2016
  23. Jeff KingJun 15, 2016
  24. ZhenTianJun 15, 2016
  25. Jeff KingJun 15, 2016
  26. Michael J GruberJun 15, 2016
  27. ZhenTianJun 15, 2016
  28. Jeff KingJun 16, 2016
  29. Junio C HamanoJun 16, 2016
  30. Michael J GruberJun 17, 2016
  31. Junio C HamanoJun 17, 2016

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.