Make rpmkeys --list accept short key IDs

Get this in sync with rpm --delete for now.
This commit is contained in:
Florian Festi 2024-10-14 12:15:48 +02:00 committed by Panu Matilainen
parent 5ffd0d8865
commit e575fac7cf
1 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,8 @@ static int matchingKeys(rpmKeyring keyring, ARGV_const_t args, void * userdata,
while ((key = rpmKeyringIteratorNext(iter))) {
char * fp = rpmPubkeyFingerprintAsHex(key);
char * keyid = rpmPubkeyKeyIDAsHex(key);
if (!strcmp(*arg, fp) || !strcmp(*arg, keyid)) {
if (!strcmp(*arg, fp) || !strcmp(*arg, keyid) ||
!strcmp(*arg, keyid+8)) {
found = true;
}
free(fp);