kbx: Change skipfnc's prototype so that we can provide all information.
authorNeal H. Walfield <neal@g10code.com>
Mon, 14 Sep 2015 09:27:43 +0000 (11:27 +0200)
committerNeal H. Walfield <neal@g10code.com>
Wed, 16 Sep 2015 13:15:20 +0000 (15:15 +0200)
commit9acbeac23668a1d0dabca27d7825430d76e095c2
tree3bdcc4b5f427d14a2b7a505d0cb9d95be4d731a6
parent83e17ab1b4cf4420f2abaf9e1f4017a9473fb281
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.
g10/getkey.c
g10/keyring.c
kbx/keybox-search-desc.h
kbx/keybox-search.c