From 79f08fb0699f4a065e3a29bc7676a90534d7ba60 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 28 Dec 2012 17:17:56 +0100 Subject: 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. --- kbx/kbxutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kbx/kbxutil.c') diff --git a/kbx/kbxutil.c b/kbx/kbxutil.c index cd9d120ff..8b2b9000d 100644 --- a/kbx/kbxutil.c +++ b/kbx/kbxutil.c @@ -411,7 +411,8 @@ import_openpgp (const char *filename, int dryrun) dump_openpgp_key (&info, p); else { - err = _keybox_create_openpgp_blob (&blob, &info, p, nparsed, 0); + err = _keybox_create_openpgp_blob (&blob, &info, p, nparsed, + NULL, 0); if (err) { fflush (stdout); -- cgit v1.2.3