kbx: Let keydb_search skip unwanted blobs.
authorWerner Koch <wk@gnupg.org>
Fri, 31 Oct 2014 11:15:34 +0000 (12:15 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 31 Oct 2014 11:15:34 +0000 (12:15 +0100)
commit935edf88ab29b2f63afc2a0e3af1b33c92033ab7
treeeed38381131b8d98f4aa95a2a6aa9227ec576699
parent28ae8ad70b3b802e67344468a4765eee6e291c68
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>
g10/keydb.c
kbx/keybox-blob.c
kbx/keybox-defs.h
kbx/keybox-dump.c
kbx/keybox-file.c
kbx/keybox-search.c
kbx/keybox-update.c
kbx/keybox.h
sm/keydb.c