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

Re: [PATCH 6/6] ssh signing: fmt-merge-msg/check_signature with tag date

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 22, 2021, 18:12 UTC
Message-ID
<211022.86a6j0kjoi.gmgdl@evledraar.gmail.com>
In-Reply-To
<20211022150949.1754477-7-fs@gigacodes.de>
On Fri, Oct 22 2021, Fabian Stelzer wrote:
Show 15 quoted lines
>  			buf = payload.buf;
>  			len = payload.len;
> -			if (check_signature(payload.buf, payload.len, 0, NULL,
> +
> +			if (parse_signed_buffer_metadata(payload.buf, "tagger",
> +							 &payload_timestamp,
> +							 &payload_signer))
> +				strbuf_addstr(&sig,
> +					_("failed to parse timestamp and signer info from payload"));
> +
> +			if (check_signature(payload.buf, payload.len,
> +					    payload_timestamp, &payload_signer,
>  					    sig.buf, sig.len, &sigc) &&
>  			    !sigc.output)
>  				strbuf_addstr(&sig, "gpg verification failed.\n");

I haven't tested this, but your addition to &sig here lacks a \n, compared to the &sig seen right above here in the diff context.

Isn't one or the other either missing a \n, or shouldn't have one? *Looks ath the surrounding code*, yeah if I'm not wrong it's the \n in the new code here that's missing.

The whole business of seemingly mixing error messages and a signature payload in the same variable seems a bit odd, but maybe I'm misreading it. In any case it seems to pre-date this series...

Previous: Fabian StelzerNext: Fabian Stelzer
Message 12 of 14 in “ssh signing: verify key lifetime”
  1. 0/6 ssh signing: verify key lifetimeFabian Stelzer, Oct 22, 2021
  2. 1/6 ssh signing: extend check_signature to accept payload metadataFabian Stelzer, Oct 22, 2021
  3. Junio C HamanoOct 23, 2021
  4. Fabian StelzerOct 25, 2021
  5. Junio C HamanoOct 25, 2021
  6. 3/6 ssh signing: verify-commit/check_signature with commit dateFabian Stelzer, Oct 22, 2021
  7. Ævar Arnfjörð BjarmasonOct 22, 2021
  8. Fabian StelzerOct 25, 2021
  9. 4/6 ssh signing: git log/check_signature with commit dateFabian Stelzer, Oct 22, 2021
  10. 5/6 ssh signing: verify-tag/check_signature with tag dateFabian Stelzer, Oct 22, 2021
  11. 6/6 ssh signing: fmt-merge-msg/check_signature with tag dateFabian Stelzer, Oct 22, 2021
  12. Ævar Arnfjörð BjarmasonOct 22, 2021
  13. Fabian StelzerOct 25, 2021
  14. 2/6 ssh signing: add key lifetime test prereqsFabian Stelzer, Oct 22, 2021

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.