aboutsummaryrefslogtreecommitdiffstats
path: root/kbx/kbxutil.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-01-28Add a hook to be called right after main.Werner Koch1-0/+1
* common/init.c (early_system_init): New stub function. Signed-off-by: Werner Koch <[email protected]>
2014-08-26Switch to the libgpg-error provided estream.Werner Koch1-0/+1
* configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14. (GPGRT_ENABLE_ES_MACROS): Define. (estream_INIT): Remove. * m4/estream.m4: Remove. * common/estream-printf.c, common/estream-printf.h: Remove. * common/estream.c, common/estream.h: Remove. * common/init.c (_init_common_subsystems): Call gpgrt initialization.
2013-11-18Make use of the *_NAME etc macros.Werner Koch1-1/+1
Replace hardwired strings at many places with new macros from config.h and use the new strusage macro replacement feature. * common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn sentinels. * agent/command.c (cmd_import_key): Use asprintf to create the prompt.
2012-12-28gpg: Add signature cache support to the keybox.Werner Koch1-1/+2
* 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.
2012-12-28gpg: First working support for keyboxes.Werner Koch1-4/+31
* 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.
2012-12-28kbxutil: Print algo number and fold similar lines.Werner Koch1-2/+4
* kbx/keybox-defs.h (_keybox_openpgp_key_info): Add field ALGO. * kbx/keybox-openpgp.c (parse_key): Store algo. * kbx/kbxutil.c (dump_openpgp_key): Print algo number. * kbx/keybox-dump.c (_keybox_dump_blob): Print identical Sig-Expire value lines with a range of indices.
2012-08-24Fix typos spotted during translationsDavid Prévot1-1/+1
* agent/genkey.c: s/to to/to/ * sm/*.c: s/failed to allocated/failed to allocate/ * sm/certlist.c, ./dirmngr/validate.c: s/should have not/should not have/ * g10/seskey.c: missing closing parenthesis * dirmngr/crlcache.c: s/may has/may have/ Consistency fix: * g10/gpg.c, kbx/kbxutil.c, sm/gpgsm.c: uppercase after Syntax * dirmngr/dirmngr_ldap: no period in Syntax * dirmngr/dirmngr-client.c: infinitive for option description: s/certificates are expected/expect certificates/
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-4/+4
The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
2012-02-06common: Add a global variable to for the default error source.Werner Koch1-2/+2
For the shared code parts it is cumbersome to pass an error sourse variable to each function. Its value is always a constant for a given binary and thus a global variable makes things a lot easier than the former macro stuff. * common/init.c (default_errsource): New global var. (init_common_subsystems): Rename to _init_common_subsystems. Set DEFAULT_ERRSOURCE. * common/init.h: Assert value of GPG_ERR_SOURCE_DEFAULT. (init_common_subsystems): New macro. * common/util.h (default_errsource): Add declaration. * kbx/keybox-defs.h: Add some GPG_ERR_SOURCE_DEFAULT trickery.
2011-04-28Update OpenPGP parser to support ECCWerner Koch1-3/+13
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-33/+31
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2010-03-22More chnages to use estream. Add a way to replace the standardWerner Koch1-1/+1
descriptors.
2010-03-10Merged jnlib into common.Werner Koch1-5/+5
2009-07-21Make bug reporting address easier changeable.Werner Koch1-3/+2
2008-12-09Minor fixes.Werner Koch1-2/+1
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-0/+2
2007-08-23Add new features to kbxutil.Werner Koch1-2/+41
Fixed bug 829 (can't encrypt if duplicated certs are in the keybox)
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-06-26More W32 related changesWerner Koch1-2/+2
2007-06-14A whole bunch of changes to allow building for Windows.Werner Koch1-1/+4
See the ChangeLogs for details.
2007-06-06First steps towards supporting W32.Werner Koch1-14/+0
This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
2007-04-20Improved logging for error orginating from libgcrypt.Werner Koch1-1/+1
2006-11-20Made some PIN pads work.Werner Koch1-1/+1
Some cleanups for 64 bit CPUs.
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2005-06-16gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch1-1/+1
char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
2004-09-30* gpgv.c (i18n_init): Always use LC_ALL.Werner Koch1-6/+1
* kbxutil.c (i18n_init): Always use LC_ALL. * gpgsm.c (i18n_init): Always use LC_ALL. * certdump.c (gpgsm_format_name): Factored code out to .. (gpgsm_format_name2): .. new. (gpgsm_print_name): Factored code out to .. (gpgsm_print_name2): .. new. (print_dn_part): New arg TRANSLATE. Changed all callers. (print_dn_parts): Ditto. (gpgsm_format_keydesc): Do not translate the SUBJECT; we require it to stay UTF-8 but we still want to filter out bad control characters. * gpgconf.c (i18n_init): Always use LC_ALL.
2004-08-24* kbxutil.c: New command --import-openpgp.Werner Koch1-27/+242
(main): Updated libgcrypt initialization stuff. (my_gcry_logger): New. (read_file): New. Taken from ../agent/protect-tool. (dump_fpr, dump_openpgp_key, import_openpgp): New. * keybox-openpgp.c: New.
2004-06-18* keybox-dump.c (_keybox_dump_file): New arg STATS_ONLY.Werner Koch1-39/+57
(update_stats): New. * kbxutil.c (main): New command --stats.
2004-04-06* configure.ac: Require libgcrypt 1.1.94.Werner Koch1-8/+8
Introduce PACKAGE_GT and set it to gnupg2. * gpg-agent.c (main): Use new libgcrypt thread library register scheme. * Makevars (DOMAIN): Init from PACKAGE_GT
2003-08-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+339
'GNUPG-1-9-BRANCH'.
2003-06-27Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch1-2/+3
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-338/+0
'GNUPG-1-9-BRANCH'.
2002-08-10Minor changes for gettextNEWPG-0-3-10Werner Koch1-1/+1
2001-11-24Added new directory common to enable sharing of some code and errorWerner Koch1-1/+1
numbers between gpg, gpgsm and gpg-agent. Move some files and code to there.
2001-11-13We have reached a state where we are able to import certs andWerner Koch1-1/+2
check the certification path.
2001-11-10Started with keybox implementation by basing it on code from the GnuPGWerner Koch1-0/+337
devel branch.