mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Add signature cache support to the keybox.
* g10/keydb.c (parse_keyblock_image): Add arg SIGSTATUS. (keydb_get_keyblock): Handle it. (build_keyblock_image): Add arg SIGSTATUS. (keydb_insert_keyblock): Handle it. * kbx/keybox-blob.c (pgp_create_sig_part): Add arg SIGSTATUS. (_keybox_create_openpgp_blob): Ditto. * kbx/kbxutil.c (import_openpgp): Adjust for above change. * kbx/keybox.h (KEYBOX_FLAG_SIG_INFO): New. * kbx/keybox-search.c (_keybox_get_flag_location): Handle new flag. (keybox_get_keyblock): Add arg R_SIGSTATUS. * kbx/keybox-update.c (keybox_insert_keyblock): Add arg SIGSTATUS. -- With this change a key listing using the keybox format is now double as fast as using a keyring. The memory use dropped as well. Measured with about 1500 keys.
This commit is contained in:
parent
564d10ea5c
commit
79f08fb069
7 changed files with 155 additions and 27 deletions
|
@ -54,7 +54,8 @@ typedef enum
|
|||
KEYBOX_FLAG_UID, /* The user ID flags; requires an uid index. */
|
||||
KEYBOX_FLAG_UID_VALIDITY,/* The validity of a specific uid, requires
|
||||
an uid index. */
|
||||
KEYBOX_FLAG_CREATED_AT /* The date the block was created. */
|
||||
KEYBOX_FLAG_CREATED_AT, /* The date the block was created. */
|
||||
KEYBOX_FLAG_SIG_INFO, /* The signature info block. */
|
||||
} keybox_flag_t;
|
||||
|
||||
/* Flag values used with KEYBOX_FLAG_BLOB. */
|
||||
|
@ -80,7 +81,8 @@ int keybox_lock (KEYBOX_HANDLE hd, int yes);
|
|||
int _keybox_write_header_blob (FILE *fp);
|
||||
|
||||
/*-- keybox-search.c --*/
|
||||
gpg_error_t keybox_get_keyblock (KEYBOX_HANDLE hd, iobuf_t *r_iobuf);
|
||||
gpg_error_t keybox_get_keyblock (KEYBOX_HANDLE hd,
|
||||
iobuf_t *r_iobuf, u32 **sigstatus);
|
||||
#ifdef KEYBOX_WITH_X509
|
||||
int keybox_get_cert (KEYBOX_HANDLE hd, ksba_cert_t *ret_cert);
|
||||
#endif /*KEYBOX_WITH_X509*/
|
||||
|
@ -92,7 +94,8 @@ int keybox_search (KEYBOX_HANDLE hd, KEYBOX_SEARCH_DESC *desc, size_t ndesc);
|
|||
|
||||
/*-- keybox-update.c --*/
|
||||
gpg_error_t keybox_insert_keyblock (KEYBOX_HANDLE hd,
|
||||
const void *image, size_t imagelen);
|
||||
const void *image, size_t imagelen,
|
||||
u32 *sigstatus);
|
||||
gpg_error_t keybox_update_keyblock (KEYBOX_HANDLE hd,
|
||||
const void *image, size_t imagelen);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue