https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8591
--- Comment #8 from Sidney Markowitz <[email protected]> --- Created attachment 6345 --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=6345&action=edit sa-update key with SHA-256 self-signatures plus UPGRADE entry I found a backup with the primary key, so we can keep the same key and refresh its self-signatures with SHA-256, as the description suggests. The key and its fingerprints stay the same, so the sa-update change I mentioned in comment 4 is not needed. Here is some more detail that is not in the initial bug description: sa-update imports the gpg public key it uses to verify rule updates if it is run and its keyring directory has no trustdb.gpg file, which GnuPG creates on the first import. At that point it imports from the file sa-update-pubkey.txt in the directory where SpamAssassin installs its rules (DEF_RULES_DIR). What that means is that when we update the key, an existing installation will not automatically get the new one when it is upgraded. The current public key contains self-signatures that were all made using SHA-1. GnuPG currently accepts that, as well as the newer SHA-256 and SHA-512. Sequoia (sq and sqv) is an alternative to GnuPG that by default does not accept keys that are self-signed with SHA-1. Debian 13 has an optional package, gpg-from-sq, that makes the gpg command run Sequoia. On those systems, sa-update will fail when it attempts to validate a rules update package by calling the gpg command with the current public key. Fedora 45 has a different problem. Its package build is switching from GnuPG to Sequoia for checking the signatures on upstream source files. With our current KEYS file, that check fails on our rules tarball, which would stop the build. Fedora's spamassassin package has not been switched yet, so its build still uses the GnuPG check, which passes. Thus, there is no problem with the current key except for sites that have installed gpg-from-sq and for Fedora's change to Sequoia in its package build. That said, we can update the public key by re-signing it using SHA-256, which will continue to work on sites that use GnuPG as well as sites that use Sequoia. The patch to UPGRADE only documents upgrade steps for sites that already have SpamAssassin. New installations don't have to do anything special. Here, I will document what was done to refresh the key. In the description (comment 0) of this issue, the reporter suggested gpg commands to re-sign the key using SHA-256. However, GnuPG keeps the subkey's back-signature on the primary key as SHA-1, which sqv also rejects. I made the new signatures with Sequoia's sq instead, which re-makes all the internal signatures. The new signatures are dated in 2008, one second after the newest of the old signatures. sqv only accepts a signature if the key had a valid self-signature at the time the signature was made. Back-dating lets signatures made before now also verify with Sequoia, such as those on the 4.0.2 and 4.0.3 release candidate rules tarballs and the rule updates already published. That includes Fedora's check of the 4.0.2 rules tarball once KEYS is updated. The attached patch replaces the key block in rules/sa-update-pubkey.txt and in its copy, debian/GPG.KEY. The patch also adds an UPGRADE entry about importing the new key. When it is committed I'll update KEYS and updates/GPG.KEY on the website. I'll do the same for KEYS in the release area on dist.apache.org. I'll also upload the key to the keyservers. +1 from me to commit for 4.0.3 Two more votes needed. -- You are receiving this mail because: You are the assignee for the bug.
