SDB:YOU or RPM Report Problems Verifying Package Signatures
From openSUSE
Contents |
Symptom
YaST Online Update (YOU) reports it cannot install a package, as it cannot verify the signature or rpm reports NOKEY.
For example, YOU reports:
ERROR(You:RPM has invalid signature.)
or rpm produces messages like:
warning: /tmp/man-pages-1.67-1.10.noarch.rpm: V3 DSA signature: NOKEY, key ID 9c800aca
Background: package signatures
The RPM package management system, as used in SUSE LINUX, uses digital signatures [wikipedia] implemented by the GNU Privacy Guard [wikipedia] to ensure that an RPM package file was produced by a trusted source (Novell/SUSE) and that it has not been tampered with (either accidentally, e.g. through data corruption during download or deliberately by a malevolent party).
For more background on the RPM package managment system and its use of digital signatures we recommend the book Maximum RPM.
Possible causes
The most common cause for problems related to RPM signatures is a corrupted download. A corrupted download itself has a number of possible causes, like a simple transmission error or a content-altering proxy (e.g. anti-virus software mistaking an RPM for an infected file). This article is not concerned with that case. We assume that you have already ruled out a corrupted download.
In this case, there is a cause that lies deeper: the RPM package management system may have forgotten which public keys are to be trusted for package signatures.
Background: RPM versions
Like most Linux software, the RPM package management software is still being developed. There are significant differences in the commands for handling keys and signatures with RPM version 3 (used in SLES8, SLSS and SLOX) and RPM version 4 (used in SLES9, SUSE 9.3 and SUSE Linux 10.x). Please make sure you know which version of RPM your system uses (when in doubt, check with rpm -q rpm) and follow the appropriate sections later on.
Analysing the cause (RPM version 4)
The RPM system should know about the keys that Novell/SUSE uses to sign SUSE RPM package files. This can be checked by studying the output of the command
rpm -qa 'gpg-pubkey*' | sort
The correct output depends on the SUSE product.
For SLES9, the output should contain at least these two keys:
gpg-pubkey-3d25d3d9-36e12d04
gpg-pubkey-9c800aca-40d8063e
With SUSE 9.3, one more key needs to be in there:
gpg-pubkey-0dfb3188-41ed929b
gpg-pubkey-3d25d3d9-36e12d04
gpg-pubkey-9c800aca-40d8063e
When the RPM system is not in working order, it will produce a different output which may even be empty.
Solution (RPM version 4)
Re-import the Novell/SUSE public keys from trusted media as follows:
- Mount the first CD of your installation media under /mnt.
- Run the command
rpm --import /mnt/gpg-pubkey-3d25d3d9-36e12d04.asc
- Run the command
rpm --import /mnt/gpg-pubkey-9c800aca-39eef481.asc
- If /mnt/gpg-pubkey-0dfb3188-41ed929b.asc exists, run the command
rpm --import /mnt/gpg-pubkey-0dfb3188-41ed929b.asc
- Check that RPM has imported the keys correctly by running
rpm -qa 'gpg-pubkey*' | sort
and checking that its output now is equal to the expected output as described above. - If the rpm line did not produce this output (e.g. its output is empty) please run the command
rpm --rebuilddb
and then repeat the key import procedure (rpm --import ..) and recheck.
Analysing the cause (RPM version 3)
Here too, the RPM system should know about two keys that Novell/SUSE uses to sign SUSE RPM package files. Where RPM version 4 has commands to deal with keys directly though, RPM version 3 had no such commands yet, so the actual commands are quite different.
When the keys for RPM are in working order, the command
gpg --no-options --no-default-keyring --keyring /usr/lib/rpm/gnupg/pubring.gpg --list-keys
should list both keys in an output similar to
/usr/lib/rpm/gnupg/pubring.gpg
------------------------------
pub 1024D/C58B7883 2002-09-03 UnitedLinux Package Signing Key
sub 2048g/797B62F9 2002-09-03 [expires: 2007-09-02]
pub 2048R/3D25D3D9 1999-03-06 SuSE Security Team
pub 1024D/9C800ACA 2000-10-19 SuSE Package Signing Key
sub 2048g/8495160C 2000-10-19 [expires: 2006-02-12]
When the RPM system is not fine, it will produce a different output which may even be empty.
Solution (RPM version 3)
Reimport the Novell/SUSE public keys from trusted media as follows:
- Mount the first CD of your installation media under /mnt.
- Run the command
gpg --no-options --no-default-keyring --keyring /usr/lib/rpm/gnupg/pubring.gpg --import /mnt/pubring.gpg
- Run
gpg --no-options --no-default-keyring --keyring /usr/lib/rpm/gnupg/pubring.gpg --list-keys
again and verify whether the keys are now imported in the keyring that RPM uses. - If you get an error message like fatal: /usr/lib/rpm/gnupg/trustdb.gpg: invalid trustdb do
rm -f /usr/lib/rpm/gnupg/trustdb.gpg
and redo the key import and verify.
Keys per product
Please note that you should always import keys from trusted media whenever possible. The hyperlinks in this section should only be used as a last resort option when trusted media are not available.
SLES10 (RC3) and SLED 10 (RC3)
- gpg-pubkey-0dfb3188-41ed929b: Open Enterprise Server <support@novell.com>
- gpg-pubkey-307e3d54-44201d5d: SuSE Package Signing Key <build@suse.de>
- gpg-pubkey-3d25d3d9-36e12d04: SuSE Security Team <security@suse.de>
- gpg-pubkey-7e2e3b05-44748aba: Novell Provo Build (Contact security@novell.com) <novell-provo-build@novell.com>
- gpg-pubkey-a1912208-446a0899: Novell Provo Build (Contact security@novell.com) <novell-provo-build@novell.com>
- gpg-pubkey-9c800aca-40d8063e: SuSE Package Signing Key <build@suse.de>
SUSE Linux 10.1
- gpg-pubkey-0dfb3188-41ed929b: Open Enterprise Server <support@novell.com>
- gpg-pubkey-1d061a62-427a396f build@novell.com (Novell Linux Products) <support@novell.com>
- gpg-pubkey-307e3d54-44201d5d SuSE Package Signing Key <build@suse.de>
- gpg-pubkey-3d25d3d9-36e12d04: SuSE Security Team <security@suse.de>
- gpg-pubkey-9c800aca-40d8063e: SuSE Package Signing Key <build@suse.de>
SUSE Linux 10.0
- gpg-pubkey-3d25d3d9-36e12d04: SuSE Security Team <security@suse.de>
- gpg-pubkey-9c800aca-40d8063e: SuSE Package Signing Key <build@suse.de>
- gpg-pubkey-15c17deb-3f9e80c9: Java Desktop Package Signing Key <jdsbuild@sun.com>
- gpg-pubkey-0dfb3188-41ed929b: Open Enterprise Server <support@novell.com>
SLES9 and OES/Linux
- gpg-pubkey-3d25d3d9-36e12d04: SuSE Security Team <security@suse.de>
- gpg-pubkey-9c800aca-40d8063e: SuSE Package Signing Key <build@suse.de>
- gpg-pubkey-15c17deb-3f9e80c9: Java Desktop Package Signing Key <jdsbuild@sun.com>
- gpg-pubkey-0dfb3188-41ed929b: Open Enterprise Server <support@novell.com>
- gpg-pubkey-b37b98a9-6647760c: SUSE PTF Signing Key <support@suse.com> (from patch-11032)
- gpg-pubkey-b37b98a9-42820f17: SUSE PTF Signing Key <support@suse.com> (obsolete; from patch-10480)
Similar/related problems
There is a similar problem with the verification of the signatures of YOU patch info files rather than RPM package files; this problem is discussed in the article SDB:YOU Reports Problems Verifying Patch Signatures .
Keywords: YOU | rpm | signature | key | verify | verification

