gpg: Improve the keyblock cache's transparency.
* kbx/keybox-search.c (keybox_offset): New function. * g10/keydb.c (struct keyblock_cache): Add fields resource and offset. (keyblock_cache_clear): Reset HD->KEYBLOCK_CACHE.RESOURCE and HD->KEYBLOCK_CACHE.OFFSET. (keydb_search): Don't use the cached result if it comes before the current file position. When caching an entry, also record the position at which it was found.
- Signed-off-by: Neal H. Walfield <neal@g10code.com>
- GnuPG-bug-id: T2187