mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-17 14:07:03 +01:00
gpg: Fix short key ID for v5key.
* g10/keyid.c (keyid_from_pk): Return keyid[0] for v5key. * g10/keyring.c (keyring_search): Handle short key ID for v5key. -- GnuPG-bug-id: 5000 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
646a30fd39
commit
20982bbd75
@ -567,7 +567,10 @@ keyid_from_pk (PKT_public_key *pk, u32 *keyid)
|
||||
keyid[0] = pk->keyid[0];
|
||||
keyid[1] = pk->keyid[1];
|
||||
|
||||
return keyid[1]; /*FIXME:shortkeyid is different for v5*/
|
||||
if (pk->fprlen == 32)
|
||||
return keyid[0];
|
||||
else
|
||||
return keyid[1];
|
||||
}
|
||||
|
||||
|
||||
|
@ -1174,7 +1174,9 @@ keyring_search (KEYRING_HANDLE hd, KEYDB_SEARCH_DESC *desc,
|
||||
break;
|
||||
|
||||
case KEYDB_SEARCH_MODE_SHORT_KID:
|
||||
if (pk && desc[n].u.kid[1] == aki[1])
|
||||
if (pk
|
||||
&& ((pk->fprlen == 32 && desc[n].u.kid[1] == aki[0])
|
||||
|| (pk->fprlen != 32 && desc[n].u.kid[1] == aki[1])))
|
||||
goto found;
|
||||
break;
|
||||
case KEYDB_SEARCH_MODE_LONG_KID:
|
||||
|
Loading…
x
Reference in New Issue
Block a user