diff options
author | Neal H. Walfield <[email protected]> | 2015-10-29 08:52:56 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-10-29 09:10:39 +0000 |
commit | 99c84b49b787dab8da26cf61eed24dd4a2b77fd9 (patch) | |
tree | 0bd75a86c98b1c21f9ec94c75aab5faedd985bad | |
parent | gpg: Change sqlite3_stepx to pass the sqlite3_stmt * to the callback. (diff) | |
download | gnupg-99c84b49b787dab8da26cf61eed24dd4a2b77fd9.tar.gz gnupg-99c84b49b787dab8da26cf61eed24dd4a2b77fd9.zip |
gpg: Fix keyring support.
* g10/keydb.c (keydb_rebuild_caches): Only mark the cached as prepared
if it is actually prepared, which it only is if the resource is a
keybox.
--
Signed-off-by: Neal H. Walfield <[email protected]>
-rw-r--r-- | g10/keydb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/keydb.c b/g10/keydb.c index da18bc062..bcafe907b 100644 --- a/g10/keydb.c +++ b/g10/keydb.c @@ -1701,7 +1701,8 @@ keydb_search (KEYDB_HANDLE hd, KEYDB_SEARCH_DESC *desc, if (!hd->no_caching && !rc && ndesc == 1 && (desc[0].mode == KEYDB_SEARCH_MODE_FPR20 - || desc[0].mode == KEYDB_SEARCH_MODE_FPR)) + || desc[0].mode == KEYDB_SEARCH_MODE_FPR) + && hd->active[hd->current].type == KEYDB_RESOURCE_TYPE_KEYBOX) { hd->keyblock_cache.state = KEYBLOCK_CACHE_PREPARED; memcpy (hd->keyblock_cache.fpr, desc[0].u.fpr, 20); |