From: "Christian Noé Ramos López" <chris@nortesoftware.dev>
To: git@vger.kernel.org
Cc: Phillip Wood <phillip.wood@dunelm.org.uk>,
Patrick Steinhardt <ps@pks.im>
Subject: [PATCH] doc: gpg: say which date SSH key lifetimes are checked against
Date: Tue, 20 Oct 2026 23:03:47 -0400 [thread overview]
Message-ID: <20261021030347.565306-1-chris@nortesoftware.dev> (raw)
In-Reply-To: <ec4de165-c7d1-43d9-979b-08c1cb67022d@gmail.com>
The description of gpg.ssh.allowedSignersFile says that Git marks a
signature as valid if the signing key was valid at the time of the
signature's creation. An SSH signature does not record when it was
made, though. When verifying a commit or a tag, Git passes the
committer or tagger date to ssh-keygen with -Overify-time, so the
valid-after and valid-before options of a key are checked against a
date that whoever creates the commit or tag can set to any value.
Say which date is used, and that it is not evidence of when the
signature was made. The same holds for the creation time in a GPG
signature, which comes from the signer's clock, so say that too.
Since whoever holds the key chooses the date, also say that a key
lifetime is only safe as long as the key has never leaked.
While at it, fix the spelling of "OpenSSH" in the same paragraph.
Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Helped-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Christian Noé Ramos López <chris@nortesoftware.dev>
---
Documentation/config/gpg.adoc | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/Documentation/config/gpg.adoc b/Documentation/config/gpg.adoc
index 240e46c05..714dd1457 100644
--- a/Documentation/config/gpg.adoc
+++ b/Documentation/config/gpg.adoc
@@ -70,10 +70,15 @@ A repository that only allows signed commits can store the file
in the repository itself using a path relative to the top-level of the working tree.
This way only committers with an already valid key can add or change keys in the keyring.
+
-Since OpensSSH 8.8 this file allows specifying a key lifetime using valid-after &
-valid-before options. Git will mark signatures as valid if the signing key was
-valid at the time of the signature's creation. This allows users to change a
-signing key without invalidating all previously made signatures.
+Since OpenSSH 8.8 this file allows specifying a key lifetime using valid-after &
+valid-before options. When verifying a commit or a tag, Git checks that lifetime
+against the committer or tagger date recorded in the commit or tag. This allows
+users to change a signing key without invalidating all previously made
+signatures. That date is chosen by whoever creates the commit or tag, so it is
+not evidence of when the signature was made; the same is true of the creation
+time in a GPG signature, which is set by the signer's clock. Relying on a key
+lifetime is therefore only safe as long as the signing key has never leaked;
+once it has, valid-after and valid-before guarantee nothing.
+
Using a SSH CA key with the cert-authority option
(see ssh-keygen(1) "CERTIFICATES") is also valid.
base-commit: 47fdf2208c5b94c8cc01c106b8f7c85efb91c926
--
2.47.3
next prev parent reply other threads:[~2026-10-21 3:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 6:56 ssh signing: valid-before is checked at the signer's own date, and a missing revocationFile fails open Christian Noé Ramos López
2026-10-08 13:42 ` Phillip Wood
2026-10-09 12:19 ` Patrick Steinhardt
2026-10-09 13:30 ` Phillip Wood
[not found] ` <CAHGSfba9Td+Lg=Nf+nfwZY2r1_eq2Mcejn__6X=VPQkmcJttfQ@mail.gmail.com>
2026-10-09 13:29 ` Phillip Wood
2026-10-21 3:03 ` Christian Noé Ramos López [this message]
2026-10-21 4:17 ` [PATCH] gpg-interface: fail when the ssh revocation file is missing Christian Noé Ramos López
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=20261021030347.565306-1-chris@nortesoftware.dev \
--to=chris@nortesoftware.dev \
--cc=git@vger.kernel.org \
--cc=phillip.wood@dunelm.org.uk \
--cc=ps@pks.im \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.