public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Uwe Kleine-König" <ukleinek@kernel.org>
Cc: git@vger.kernel.org,
	 Linus Torvalds <torvalds@linux-foundation.org>,
	"Neal H. Walfield" <neal@walfield.org>
Subject: Re: [PATCH v1] gpg-interface: Signatures by expired keys are fine
Date: Wed, 04 Feb 2026 09:26:09 -0800	[thread overview]
Message-ID: <xmqqjywspgi6.fsf@gitster.g> (raw)
In-Reply-To: <20260204152306.1767112-2-ukleinek@kernel.org> ("Uwe Kleine-König"'s message of "Wed, 4 Feb 2026 16:23:06 +0100")

Uwe Kleine-König <ukleinek@kernel.org> writes:

> If a signature is done with a valid key and that key later expires, the
> signature should still be considered good.
>
> GnuPG exmits in this case something like:

"emits".

> diff --git a/gpg-interface.c b/gpg-interface.c
> index 47222bf31b6e..6635c6c8e16f 100644
> --- a/gpg-interface.c
> +++ b/gpg-interface.c
> @@ -382,7 +382,7 @@ static int verify_gpg_signed_buffer(struct signature_check *sigc,
>  
>  	delete_tempfile(&temp);
>  
> -	ret |= !strstr(gpg_stdout.buf, "\n[GNUPG:] GOODSIG ");
> +	ret |= !strstr(gpg_stdout.buf, "\n[GNUPG:] GOODSIG ") && !strstr(gpg_stdout.buf, "\n[GNUPG:] EXPKEYSIG ");

Makes sense; I'll wrap this overlong line while queuing, though.

>  	sigc->output = strbuf_detach(&gpg_stderr, NULL);
>  	sigc->gpg_status = strbuf_detach(&gpg_stdout, NULL);
>  
> @@ -680,7 +680,7 @@ int check_signature(struct signature_check *sigc,
>  	if (status && !sigc->output)
>  		return !!status;
>  
> -	status |= sigc->result != 'G';
> +	status |= sigc->result != 'G' && sigc->result != 'Y';
>  	status |= sigc->trust_level < configured_min_trust_level;
>  
>  	return !!status;
>
> base-commit: b2826b52eb7caff9f4ed6e85ec45e338bf02ad09

  parent reply	other threads:[~2026-02-04 17:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 15:23 [PATCH v1] gpg-interface: Signatures by expired keys are fine Uwe Kleine-König
2026-02-04 15:35 ` Neal H. Walfield
2026-02-04 17:26 ` Junio C Hamano [this message]
2026-02-04 21:18   ` Uwe Kleine-König
2026-02-04 21:27     ` Junio C Hamano
2026-02-05  9:38       ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqjywspgi6.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=neal@walfield.org \
    --cc=torvalds@linux-foundation.org \
    --cc=ukleinek@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox