mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
28ae8ad70b
commit
935edf88ab
9 changed files with 61 additions and 51 deletions
|
@ -154,7 +154,7 @@ _keybox_write_header_blob (FILE *fp, int for_openpgp)
|
|||
/* Length of this blob. */
|
||||
image[3] = 32;
|
||||
|
||||
image[4] = BLOBTYPE_HEADER;
|
||||
image[4] = KEYBOX_BLOBTYPE_HEADER;
|
||||
image[5] = 1; /* Version */
|
||||
if (for_openpgp)
|
||||
image[7] = 0x02; /* OpenPGP data may be available. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue