forked from rpm-software-management/rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check not configured keystore backends for keys
Give an warning if they contain public keys. This allows the user to detect misconfigurations or missing conversion from one backend to another.
- Loading branch information
Showing
4 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1960,3 +1960,29 @@ rpm -qp --qf "[%{filenames}:%{filesignatures}\n]" hello-2.0-1.x86_64-badima.rpm | |
], | ||
[]) | ||
RPMTEST_CLEANUP | ||
|
||
AT_SETUP([keyring check keystores]) | ||
AT_KEYWORDS([rpmkeys signature]) | ||
RPMDB_INIT | ||
|
||
runroot rpmkeys \ | ||
--define "_keyring rpmdb" \ | ||
--import /data/keys/rpm.org-rsa-2048-add-subkey.asc | ||
runroot rpmkeys \ | ||
--define "_keyring fs" \ | ||
--import /data/keys/alice.asc | ||
|
||
RPMTEST_CHECK([[ | ||
runroot rpmkeys --define "_keyring rpmdb" --list | ||
echo "===============================================" | ||
runroot rpmkeys --define "_keyring rpmdb" -Kv /data/RPMS/hello-2.0-1.x86_64-signed-with-new-subkey.rpm | grep "Header OpenPGP" | ||
]], | ||
[0], | ||
[771b18d3d7baa28734333c424344591e1964c5fc rpm.org RSA testkey <[email protected]> public key | ||
=============================================== | ||
Header OpenPGP V4 EdDSA/SHA512 signature, key fingerprint: 771b18d3d7baa28734333c424344591e1964c5fc: OK | ||
], | ||
[warning: there are public keys in the fs backend which is not the one configured (rpmdb) | ||
warning: there are public keys in the fs backend which is not the one configured (rpmdb) | ||
]) | ||
RPMTEST_CLEANUP |