summaryrefslogtreecommitdiffstats
path: root/g10/keyring.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/keyring.c')
-rw-r--r--g10/keyring.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/keyring.c b/g10/keyring.c
index 992c280d2..9cd66db3a 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -1174,8 +1174,10 @@ 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])
- goto found;
+ 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:
if (pk && desc[n].u.kid[0] == aki[0]