diff options
author | Werner Koch <wk@gnupg.org> | 2012-12-28 14:03:16 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2012-12-28 14:05:27 +0100 |
commit | a9863834244fc2a58d8950977243702d12e420a1 (patch) | |
tree | c8f43d91372f0f5a8373fbc745e5ee5d55e49d74 /kbx/keybox-defs.h | |
parent | kbxutil: Print algo number and fold similar lines. (diff) | |
download | gnupg2-a9863834244fc2a58d8950977243702d12e420a1.tar.xz gnupg2-a9863834244fc2a58d8950977243702d12e420a1.zip |
gpg: First working support for keyboxes.
* g10/getkey.c (get_pubkey_fast): Improve the assertion.
* kbx/keybox.h: Include iobuf.h.
* kbx/keybox-blob.c (keyboxblob_uid): Add field OFF.
(KEYBOX_WITH_OPENPGP): Remove use of this macro.
(pgp_create_key_part_single): New.
(pgp_temp_store_kid): Change to use the keybox-openpgp parser.
(pgp_create_key_part): Ditto.
(pgp_create_uid_part): Ditto.
(pgp_create_sig_part): Ditto.
(pgp_create_blob_keyblock): Ditto.
(_keybox_create_openpgp_blob): Ditto.
* kbx/keybox-search.c (keybox_get_keyblock): New.
* kbx/keybox-update.c (keybox_insert_keyblock): New.
* g10/keydb.c (parse_keyblock_image):
(keydb_get_keyblock): Support keybox.
(build_keyblock_image): New.
(keydb_insert_keyblock): Support keybox.
* kbx/kbxutil.c (import_openpgp, main): Add option --dry-run and print
a kbx file to stdout.
* kbx/keybox-file.c (_keybox_read_blob2): Allow keyblocks up to 10^6
bytes.
--
Import and key listing does now work with the keybox format. It is
still quite slow and signature caching is completely missing.
Increasing the maximum allowed length for a keyblock was required due
to a 700k keyblock which inhibited kbxutil to list the file.
kbxutil's option name --import-openpgp is not quite appropriate
because it only creates KBX blobs from OpenPGP data.
Diffstat (limited to 'kbx/keybox-defs.h')
-rw-r--r-- | kbx/keybox-defs.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kbx/keybox-defs.h b/kbx/keybox-defs.h index c58801638..8fdc54d61 100644 --- a/kbx/keybox-defs.h +++ b/kbx/keybox-defs.h @@ -156,9 +156,11 @@ void _keybox_close_file (KEYBOX_HANDLE hd); /*-- keybox-blob.c --*/ -#ifdef KEYBOX_WITH_OPENPGP - /* fixme */ -#endif /*KEYBOX_WITH_OPENPGP*/ +gpg_error_t _keybox_create_openpgp_blob (KEYBOXBLOB *r_blob, + keybox_openpgp_info_t info, + const unsigned char *image, + size_t imagelen, + int as_ephemeral); #ifdef KEYBOX_WITH_X509 int _keybox_create_x509_blob (KEYBOXBLOB *r_blob, ksba_cert_t cert, unsigned char *sha1_digest, int as_ephemeral); |