]> git.ipfire.org Git - thirdparty/systemd.git/commit
import: Trust subkeys included in signature
authorKai Lüke <kai@amutable.com>
Wed, 29 Apr 2026 04:57:56 +0000 (13:57 +0900)
committerKai Lüke <kai@amutable.com>
Wed, 1 Jul 2026 13:02:15 +0000 (22:02 +0900)
commit80e12bf88cd2bba7a0e9294d8259ced45cc6a7db
treef05edba13ea5bb3def0ac328ec2ebca7991eb059
parente50f4b7387451f30569feff66997d434ea84263d
import: Trust subkeys included in signature

With gpg sub keys one can rotate signing keys while having a stable
trust anchor. So far one still had to ship the sub key out of band but
a newer gpg has the option to include the sub key in the signature and
import it automatically. This is safe if we only allow importing a sub
key signed by the top key we already have in the key ring.
Add the --auto-key-import argument to gpg to import subkeys but also
set --import-options=merge-only,import-clean to restrict what we import
to only be sub keys signed by the top key we have in the keyring and
discard any irrelevant parts. The ugly part is that we also have to
work on a temporary copy of the keyring because gpg wants to persist
the added key material but we don't what that here.
README
src/import/pull-common.c