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

Re: [PATCH/RFC] builtin/tag.c: move PGP verification inside builtin.

From
Jeff King <peff@peff.net>
Date
Mar 24, 2016, 23:27 UTC
Message-ID
<20160324232745.GA18499@sigill.intra.peff.net>
In-Reply-To
<20160324223257.GE8830@LykOS>
On Thu, Mar 24, 2016 at 06:32:58PM -0400, Santiago Torres wrote:
Show 8 quoted lines
> > But I notice that we already handle SIGPIPE explicitly in sign_buffer()
> > for similar reasons.  What I was wondering earlier was whether we should
> > teach other functions that call gpg (like verify_signed_buffer()) to
> > ignore SIGPIPE, too, so that we can return a reasonable error value
> > rather than just killing the whole program.
> 
> Now I get it  I think this should be easy to achieve by moving
> verify_tag() to tag.c, along with the static run_gpg_verify functions.
Exactly.
> I could move the SIGPIPE call inside the verify-tag command and patch up
> everything accordingly. Does this sound ok?
I think that works, but take note of two things:
  - convert it to sigchain_push(), and make sure you sigchain_pop() it
    when you are done, so that the caller retains their original SIGPIPE
    behavior after the function returns. See the example in
    sign_buffer().
  - you should probably do it as close to the gpg call as possible, so
    as to affect as little code as possible. So probably in
    verify_signed_buffer(), not in verify_tag().
-Peff
Previous: Santiago TorresNext: Jeff King
Message 5 of 7 in “builtin/tag.c: move PGP verification inside builtin.”
  1. builtin/tag.c: move PGP verification inside builtin.santiago@nyu.edu, Mar 24, 2016
  2. Santiago TorresMar 24, 2016
  3. Jeff KingMar 24, 2016
  4. Santiago TorresMar 24, 2016
  5. Jeff KingMar 24, 2016
  6. Jeff KingMar 24, 2016
  7. Santiago TorresMar 24, 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.