Before you start
KeySigner release approvals, rpmkeys and GnuPG
- Use two enrolled owners, a disposable signed RPM outside production repositories, and the publisher certificate with an independently verified fingerprint. Use an RPM build that supports the _pkgverify_level verification policy.
Data and access
Approve the exact signed RPM
Have the publisher sign the test RPM before you compute its SHA-256. Register the test package under registry rpm and set the rule to require both owners. In your KeySigner test release workflow, submit the digest with the sha256: prefix, along with the package, full version and release, and source run. Save the approved request ID and digest.
sha256sum package-1.0.0-1.noarch.rpmCheck. The request waits after the first eligible approval and becomes approved once both owners approve the original signed file.
Check the publisher’s key
Compare the full fingerprint with the expected fingerprint from your release policy. Use a file that contains only the verified publisher certificate. Create a temporary RPM database and import that certificate into it.
gpg --show-keys --with-fingerprint publisher.asc keys="$(mktemp -d)" rpmkeys --dbpath "$keys" --import publisher.ascCheck. The certificate has the expected fingerprint, and the temporary RPM database contains only that trusted publisher certificate.
Verify the copy you received
Download the RPM from the test location. Use the temporary RPM database to require a signature and check the package digests. Stop if verification fails or the expected signature is missing.
rpmkeys --dbpath "$keys" --define '_pkgverify_level all' \ --checksig --verbose package-1.0.0-1.noarch.rpmCheck. rpmkeys exits successfully and reports a valid signature and digests for that file.
Compare it with the release approval
In the KeySigner console, open Accounts and find the approved request in the package history. Hash the same file that passed verification. Compare all 64 hexadecimal characters with the KeySigner digest after the sha256: prefix. After publication, the requester or an administrator can record the digest of the served RPM with POST /v1/operations/{operation_id}/published-bytes.
sha256sum package-1.0.0-1.noarch.rpmCheck. The file digest exactly matches the approved digest. If submitted, KeySigner records a match.
Try a signed replacement
Change a file inside the test package, rebuild with the same name, version and release, and have the same test publisher sign it again. Repeat the signature check and compare the digest with the original approval. If you record the replacement digest against the original request, review the resulting finding in KeySigner.
Check. The replacement’s publisher signature can pass. Its changed digest differs from the approval, and recording that digest creates a finding.
Check your result
Release the RPM after the expected publisher signature and the approved digest both pass for the same file. Keep the request ID, source run, verified fingerprint and digest with the release record.
What we tested
Tested on . RPM 6.1.0 verified two local builds signed by the same test publisher. It rejected the unsigned build, altered bytes and verification without the publisher key. In a local KeySigner test, two owners approved the original RPM. KeySigner recorded a match for it and a mismatch and finding for the signed replacement.
If you get stuck
The publisher signature passes and the digest differs
Pause the release and compare the signed build output and the file you downloaded. Rebuilding or re-signing a package can change its bytes. If the replacement is intended, request a new approval for its exact digest.