diff options
author | Werner Koch <[email protected]> | 2014-11-02 15:36:40 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-11-02 15:36:40 +0000 |
commit | d95f05c314adfecbe0af9073f964030010442f9b (patch) | |
tree | 219eb2eff65618392aa74122fc719a2eff0e3e04 | |
parent | gpg: Minor cleanup for key listing related code. (diff) | |
download | gnupg-d95f05c314adfecbe0af9073f964030010442f9b.tar.gz gnupg-d95f05c314adfecbe0af9073f964030010442f9b.zip |
gpg: Fix endless loop in keylisting with fingerprint.
* g10/getkey.c (getkey_next): Disable cache.
--
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | g10/getkey.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/getkey.c b/g10/getkey.c index fe183faaf..4a4dd551d 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -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); |