Merge branch 'uk/signature-is-good-after-key-expires' into next

A signature on a commit that was GPG signed long time ago ought to
be still valid after the key that was used to sign it has expired,
but we showed them in alarming red.

* uk/signature-is-good-after-key-expires:
  gpg-interface: signatures by expired keys are fine
This commit is contained in:
Junio C Hamano
2026-02-22 12:27:57 -08:00

View File

@@ -382,7 +382,8 @@ 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 ");
sigc->output = strbuf_detach(&gpg_stderr, NULL);
sigc->gpg_status = strbuf_detach(&gpg_stdout, NULL);
@@ -680,7 +681,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;