diff options
author | Werner Koch <[email protected]> | 2015-07-31 10:02:08 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-07-31 10:02:08 +0000 |
commit | 328a6b6459a5ce4a70b374262f221ada20c40878 (patch) | |
tree | 3f57d9799af15f70adacb29abc3b006b7d3ea8c7 | |
parent | gpg: Do not return "Legacy Key" from lookup if a key is expired. (diff) | |
download | gnupg-328a6b6459a5ce4a70b374262f221ada20c40878.tar.gz gnupg-328a6b6459a5ce4a70b374262f221ada20c40878.zip |
gpg: Fix endless loop for expired keys given by fpr.
* g10/getkey.c (lookup): Disable keydb caching when continuing a
search.
--
Caches are Fierce Creatures.
Reported-by: Patrick Brunschwig
Diffstat (limited to '')
-rw-r--r-- | g10/getkey.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/g10/getkey.c b/g10/getkey.c index 14b912a4b..f02e8c2b1 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -2621,6 +2621,11 @@ lookup (getkey_ctx_t ctx, kbnode_t *ret_keyblock, int want_secret) /* Release resources and continue search. */ release_kbnode (ctx->keyblock); ctx->keyblock = NULL; + /* 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 may have been cached, if won't be used then. */ + keydb_disable_caching (ctx->kr_handle); } found: |