verifySignature in mfer/openpgp.go treats ErrKeyExpired from the OpenPGP library as success, so that a manifest outlives its key. The library checks key expiry before signature expiry (checkMessageSignatureDetails in go-crypto's openpgp/read.go), so for an expired key it never reports an expired signature. A signature carrying its own expiry time, as gpg --sig-expire writes, is therefore refused while the key is live (signature expired) and accepted once the key has expired as well. The signer's statement that the signature is void after a date is honoured only while the key is still good.
Confirmed on next (0fbb3da) with a scratch test: a 2020 key with a one-day lifetime and a one-hour signature lifetime verifies; the same signature lifetime on a key with no expiry is refused.
Correct: a signature past its own expiry is refused whatever the state of the key. verifySignature reads the one signature packet (it already counts them) and checks its expiry before tolerating ErrKeyExpired. In docs/FORMAT.md terms: one good, unexpired signature by a key that may have expired since.
Definition of done
Failing test first: expired key plus expired signature is refused; expired key plus unexpiring signature still verifies (TestVerifySignatureKeyExpiredSince).
The fix in mfer/openpgp.go.
docs/FORMAT.md Signature Scheme states the rule.
make check passes.
Model: fable-5-1
`verifySignature` in `mfer/openpgp.go` treats `ErrKeyExpired` from the OpenPGP library as success, so that a manifest outlives its key. The library checks key expiry before signature expiry (`checkMessageSignatureDetails` in go-crypto's `openpgp/read.go`), so for an expired key it never reports an expired signature. A signature carrying its own expiry time, as `gpg --sig-expire` writes, is therefore refused while the key is live (`signature expired`) and accepted once the key has expired as well. The signer's statement that the signature is void after a date is honoured only while the key is still good.
Confirmed on `next` (0fbb3da) with a scratch test: a 2020 key with a one-day lifetime and a one-hour signature lifetime verifies; the same signature lifetime on a key with no expiry is refused.
Correct: a signature past its own expiry is refused whatever the state of the key. `verifySignature` reads the one signature packet (it already counts them) and checks its expiry before tolerating `ErrKeyExpired`. In `docs/FORMAT.md` terms: one good, unexpired signature by a key that may have expired since.
## Definition of done
- Failing test first: expired key plus expired signature is refused; expired key plus unexpiring signature still verifies (`TestVerifySignatureKeyExpiredSince`).
- The fix in `mfer/openpgp.go`.
- `docs/FORMAT.md` Signature Scheme states the rule.
- `make check` passes.
Model: fable-5-1
clawbot
self-assigned this 2026-10-12 11:17:37 +02:00
Fixed in #201: a signature past its own expiry time is now refused even when its key has expired too, and docs/FORMAT.md Signature Scheme states the rule.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/mfer/pulls/201: a signature past its own expiry time is now refused even when its key has expired too, and `docs/FORMAT.md` Signature Scheme states the rule.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
verifySignatureinmfer/openpgp.gotreatsErrKeyExpiredfrom the OpenPGP library as success, so that a manifest outlives its key. The library checks key expiry before signature expiry (checkMessageSignatureDetailsin go-crypto'sopenpgp/read.go), so for an expired key it never reports an expired signature. A signature carrying its own expiry time, asgpg --sig-expirewrites, is therefore refused while the key is live (signature expired) and accepted once the key has expired as well. The signer's statement that the signature is void after a date is honoured only while the key is still good.Confirmed on
next(0fbb3da) with a scratch test: a 2020 key with a one-day lifetime and a one-hour signature lifetime verifies; the same signature lifetime on a key with no expiry is refused.Correct: a signature past its own expiry is refused whatever the state of the key.
verifySignaturereads the one signature packet (it already counts them) and checks its expiry before toleratingErrKeyExpired. Indocs/FORMAT.mdterms: one good, unexpired signature by a key that may have expired since.Definition of done
TestVerifySignatureKeyExpiredSince).mfer/openpgp.go.docs/FORMAT.mdSignature Scheme states the rule.make checkpasses.Model: fable-5-1
Fixed in #201: a signature past its own expiry time is now refused even when its key has expired too, and
docs/FORMAT.mdSignature Scheme states the rule.Model: opus-5-5