1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpg: Fix endless loop in keylisting with fingerprint.

* g10/getkey.c (getkey_next): Disable cache.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2014-11-02 16:36:40 +01:00
parent 440e8f5170
commit d95f05c314

View File

@ -1232,6 +1232,12 @@ getkey_next (getkey_ctx_t ctx, PKT_public_key *pk, kbnode_t *ret_keyblock)
{
int rc; /* Fixme: Make sure this is proper gpg_error */
/* We need to disable the caching so that for an exact key search we
won't get the result back from the cache and thus end up in an
endless loop. Disabling this here is sufficient because although
the result has been cached, if won't be used then. */
keydb_disable_caching (ctx->kr_handle);
rc = lookup (ctx, ret_keyblock, ctx->want_secret);
if (!rc && pk && ret_keyblock)
pk_from_block (ctx, pk, *ret_keyblock);