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

Re: [PATCH v2] gpg-interface: use more status letters

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Sep 28, 2016, 15:10 UTC
Message-ID
<dc55746d-ccca-e5d5-be08-01082b5610d4@ramsayjones.plus.com>
In-Reply-To
<c4777ef68059034d7ad4697a06bba3cabbdc9265.1475053649.git.git@drmicha.warpmail.net>
On 28/09/16 15:24, Michael J Gruber wrote:
Show 49 quoted lines
> According to gpg2's doc/DETAILS:
> "For each signature only one of the codes GOODSIG, BADSIG, EXPSIG,
> EXPKEYSIG, REVKEYSIG or ERRSIG will be emitted."
> 
> gpg1 ("classic") behaves the same (although doc/DETAILS
> differs).
> 
> Currently, we parse gpg's status output for GOODSIG, BADSIG and trust
> information and translate that into status codes G, B, U, N for the %G?
> format specifier.
> 
> git-verify-* returns success in the GOODSIG case only. This is somewhat in
> disagreement with gpg, which considers the first 5 of the 6 above as VALIDSIG,
> but we err on the very safe side.
> 
> Introduce additional status codes E, X, R for ERRSIG, EXP*SIG, REVKEYSIG
> so that a user of %G? gets more information about the absence of a 'G'
> on first glance.
> 
> Requested-by: Alex <agrambot@gmail.com>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
> Changes in v2:
> 
> - Use GNUPGHOME="$HOME/gnupg-home-not-used" just like in other tests (lib).
> - Do not parse for signer UID in the ERRSIG case (and test that we do not).
> - Retreat "rather" addition from the doc: good/valid are terms that we use
>   differently from gpg anyways.
> 
>  Documentation/pretty-formats.txt |  9 +++++++--
>  gpg-interface.c                  | 13 ++++++++++---
>  pretty.c                         |  3 +++
>  t/t7510-signed-commit.sh         | 12 +++++++++++-
>  4 files changed, 31 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
> index a942d57..c28ff2b 100644
> --- a/Documentation/pretty-formats.txt
> +++ b/Documentation/pretty-formats.txt
> @@ -143,8 +143,13 @@ ifndef::git-rev-list[]
>  - '%N': commit notes
>  endif::git-rev-list[]
>  - '%GG': raw verification message from GPG for a signed commit
> -- '%G?': show "G" for a good (valid) signature, "B" for a bad signature,
> -  "U" for a good signature with unknown validity and "N" for no signature
> +- '%G?': show "G" for a good (valid) signature,
> +  "B" for a bad signature,
> +  "U" for a good signature with unknown validity,
> +  "X" for a good expired signature, or good signature made by an expired key,
Hmm, this looks odd. Would the following:
    "X" for a good signature made with an expired key,
mean something different?

ATB, Ramsay Jones

Previous: Michael J GruberNext: Junio C Hamano
Message 7 of 16 in “Request: Extra case for %G? format”
  1. AlexSep 25, 2016
  2. Michael J GruberSep 26, 2016
  3. AlexSep 26, 2016
  4. gpg-interface: use more status lettersMichael J Gruber, Sep 27, 2016
  5. Junio C HamanoSep 27, 2016
  6. gpg-interface: use more status lettersMichael J Gruber, Sep 28, 2016
  7. Ramsay JonesSep 28, 2016
  8. Junio C HamanoSep 28, 2016
  9. Ramsay JonesSep 28, 2016
  10. Michael J GruberSep 30, 2016
  11. Junio C HamanoSep 30, 2016
  12. Junio C HamanoOct 6, 2016
  13. Michael J GruberOct 10, 2016
  14. Junio C HamanoOct 10, 2016
  15. gpg-interface: use more status lettersMichael J Gruber, Oct 12, 2016
  16. Michael J GruberSep 30, 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.