summaryrefslogtreecommitdiffstats
path: root/g10/keyring.c
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@g10code.com>2015-09-14 11:27:43 +0200
committerNeal H. Walfield <neal@g10code.com>2015-09-16 15:15:20 +0200
commit9acbeac23668a1d0dabca27d7825430d76e095c2 (patch)
tree3bdcc4b5f427d14a2b7a505d0cb9d95be4d731a6 /g10/keyring.c
parentg10: Remove unused prototype (get_pubkey_byfpr). (diff)
downloadgnupg2-9acbeac23668a1d0dabca27d7825430d76e095c2.tar.xz
gnupg2-9acbeac23668a1d0dabca27d7825430d76e095c2.zip
kbx: Change skipfnc's prototype so that we can provide all information.
* kbx/keybox-search-desc.h (struct keydb_search_desc.skipfnc): Change third parameter to be the index of the user id packet in the keyblock rather than the packet itself. Update users. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>. The keybox code doesn't work directly with keyblocks. As such, the matched user packet is not readily available to pass to DESC[n].SKIPFNC. But, we do know the index of the user id packet that matched. Thus, pass that instead. If the skip function needs the user id packet, it can use the key id to look up the key block and find the appropriate packet.
Diffstat (limited to 'g10/keyring.c')
-rw-r--r--g10/keyring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/keyring.c b/g10/keyring.c
index a5178ace4..81d2174ce 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -1148,7 +1148,7 @@ keyring_search (KEYRING_HANDLE hd, KEYDB_SEARCH_DESC *desc,
for (n=any_skip?0:ndesc; n < ndesc; n++)
{
if (desc[n].skipfnc
- && desc[n].skipfnc (desc[n].skipfncvalue, aki, uid))
+ && desc[n].skipfnc (desc[n].skipfncvalue, aki, uid_no))
break;
}
if (n == ndesc)