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

Re: [PATCH 1/1] gpg-interface: prefer check_signature() for GPG verification

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 30, 2019, 21:57 UTC
Message-ID
<xmqqo8wt10yl.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20191127174821.5830-2-hji@dyntopia.com>
Hans Jerry Illikainen <hji@dyntopia.com> writes:
Show 9 quoted lines
> This commit refactors the use of verify_signed_buffer() outside of
> gpg-interface.c to use check_signature() instead.  It also turns
> verify_signed_buffer() into a file-local function since it's now only
> invoked internally by check_signature().
>
> There were previously two globally scoped functions used in different
> parts of Git to perform GPG signature verification:
> verify_signed_buffer() and check_signature().  Now only
> check_signature() is used.

OK. I wondered why the former does not get removed, but if the latter uses it as its implementation detail, then it is expected that it has to remain. So check_signature() allows it to make a minimum sanity check, but it does its own verification based on the status output, and both have to pass for a signature to be valid? Which makes sense to me.

Show 5 quoted lines
> Now all operations that does signature verification share a single entry
> point to gpg-interface.c.  This makes it easier to propagate changed or
> additional functionality in GPG signature verification to all parts of
> Git, without having odd edge-cases that don't perform the same degree of
> verification.
Makes sense.
Previous: Hans Jerry IllikainenNext: Hans Jerry Illikainen
Message 3 of 10 in “gpg-interface: prefer check_signature() for GPG verification”
  1. 0/1 gpg-interface: prefer check_signature() for GPG verificationHans Jerry Illikainen, Nov 27, 2019
  2. 1/1 gpg-interface: prefer check_signature() for GPG verificationHans Jerry Illikainen, Nov 27, 2019
  3. Junio C HamanoNov 30, 2019
  4. 0/2 gpg-interface: prefer check_signature() for GPG verificationHans Jerry Illikainen, Mar 4, 2020
  5. 1/2 t: increase test coverage of signature verification outputHans Jerry Illikainen, Mar 4, 2020
  6. Johannes SchindelinMar 14, 2020
  7. Junio C HamanoMar 15, 2020
  8. 2/2 gpg-interface: prefer check_signature() for GPG verificationHans Jerry Illikainen, Mar 4, 2020
  9. Junio C HamanoMar 5, 2020
  10. Johannes SchindelinMar 6, 2020

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.