summaryrefslogtreecommitdiffstats
path: root/g10/keydb.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-10-31 12:15:34 +0100
committerWerner Koch <wk@gnupg.org>2014-10-31 12:15:34 +0100
commit935edf88ab29b2f63afc2a0e3af1b33c92033ab7 (patch)
treeeed38381131b8d98f4aa95a2a6aa9227ec576699 /g10/keydb.c
parentgpg: Fix --rebuild-keydb-caches. (diff)
downloadgnupg2-935edf88ab29b2f63afc2a0e3af1b33c92033ab7.tar.xz
gnupg2-935edf88ab29b2f63afc2a0e3af1b33c92033ab7.zip
kbx: Let keydb_search skip unwanted blobs.
* kbx/keybox.h (keybox_blobtype_t): New. * kbx/keybox-defs.h (BLOBTYPE_*): Replace by KEYBOX_BLOBTYPE_*. * kbx/keybox-search.c (keybox_search): Add arg want_blobtype and skip non-matching blobs. * sm/keydb.c (keydb_search): Pass KEYBOX_BLOBTYPE_X509 to keybox_search. * g10/keydb.c (keydb_search): Pass KEYBOX_BLOBTYPE_PGP to keybox_search. -- Without this fix a listing of all keys would fail because the wrong blob type would be returned for the gpg or gpgsm. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/keydb.c')
-rw-r--r--g10/keydb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/keydb.c b/g10/keydb.c
index c192e06b4..a2cab18e2 100644
--- a/g10/keydb.c
+++ b/g10/keydb.c
@@ -1448,7 +1448,8 @@ keydb_search (KEYDB_HANDLE hd, KEYDB_SEARCH_DESC *desc,
break;
case KEYDB_RESOURCE_TYPE_KEYBOX:
rc = keybox_search (hd->active[hd->current].u.kb, desc,
- ndesc, descindex, &hd->skipped_long_blobs);
+ ndesc, KEYBOX_BLOBTYPE_PGP,
+ descindex, &hd->skipped_long_blobs);
break;
}
if (rc == -1 || gpg_err_code (rc) == GPG_ERR_EOF)