Repository navigation
Conversation
gpg judges key expiry at verification time and reports a signature made by a key that has expired since as EXPKEYSIG, so rejecting EXPKEYSIG made the jars of all earlier releases fail verification once the release key expires. checkSign accepts EXPKEYSIG as well as GOODSIG and rejects only a revoked release key. gpg reports a key that has been revoked and has also expired as EXPKEYSIG, so revocation is also read from the key listing.
|
[DISCUSS] With [NIT] An expired key is now accepted without any message. Keeping |
|
Agree with @halibobo1205 . [NIT] Consider keeping warn 'the release key has expired' when accepting an EXPKEYSIG. Verification would still succeed, and the warning would make the expired release key visible in the logs. |
What does this PR do?
For user experience,
start.shaccepts for now a release jar signed by the release key after the key has expired. It still rejects the jar when the release key has been revoked, including a revoked key that has also expired.start.sh:checkSignaccepts the release key's signature when gpg reports it asGOODSIGorEXPKEYSIG, and reads revocation from the key listing as well as fromREVKEYSIG.shell.md: a signature made by a revoked release key fails verification; an expired release key is no longer mentioned.Why are these changes required?
Since #7090,
checkSignrejects a signature that gpg reports asEXPKEYSIG. gpg judges key expiry at verification time, not at signing time, so a signature made while the key was valid is reported asEXPKEYSIGonce the key has expired. If the release signing subkey expires before its expiry is extended, the jars of all earlier releases fail verification, and--download,--upgrade,--releaseand the archive tool download no longer install them.Accepting
EXPKEYSIGis not enough on its own: gpg reports a signature made by a key that has been revoked and has also expired asEXPKEYSIG, notREVKEYSIG. SocheckSignalso reads revocation fromgpg --with-colons --list-keys, from the records of the primary key and the release subkey, and rejects the jar if either has been revoked.This PR has been tested by:
checkSigntaken unchanged fromstart.shbefore and after this change, run with real gpg 2.5.20 under macOS bash 3.2. The key server and the downloads are replaced by local fixtures, and the fixture keys are structured like the release key (a certify-only primary key with a signing subkey). Signatures made before and after the expiry of a key are created with gpg's clock set back (--faked-system-time).bash -n start.sh;shellcheckreports nothing new.Follow up
The release signing subkey
F859BCB44A28290Bexpires on 2027-01-03. gpg does not sign with an expired key, so the subkey's expiry has to be extended, and published to keys.openpgp.org and keyserver.ubuntu.com, before a release is signed after that date. A new signing subkey would instead requireRELEASE_KEY_FINGERPRINTinstart.shto be updated.Extra details
start.shfrom accepting its signatures. Revoking needs the primary key or its revocation certificate.