Commit Graph

296 Commits

Author SHA1 Message Date
Werner Koch f6d7b3f1ee gpg: Set the node flags while retrieving a keyblock.
* g10/keydb.c (parse_keyblock_image): Add args PK_NO and UID_NO and
set the note flags accordingly.
(keydb_get_keyblock): Transfer PK_NO and UID_NO to parse_keyblock_image.
* kbx/keybox-search.c (blob_cmp_fpr, blob_cmp_fpr_part)
(blob_cmp_name, blob_cmp_mail): Return the key/user number.
(keybox_search): Set the key and user number into the found struct.
(keybox_get_keyblock): Add args R_PK_NO and R_UID_NO and set them from
the found struct.
--

getkey.c needs to know whether the correct subkey was found.  Thus we
need to set the node flags the same way we did it with the keyring
storage.
2013-01-07 21:14:52 +01:00
Werner Koch fb31462e7e gpg: Allow searching for user ids in a keybox.
* kbx/keybox-search.c (blob_cmp_name): Add arg X509 and adjust for PGP
use.  Change callers.
(blob_cmp_mail): Add arg X509 and find the mailbox offset for PGP.
Chnage callers.
(has_subject_or_alt): Rename to has_username.
(has_username): Allow blobtype PGP.
(has_mail): Ditto.
2013-01-07 15:41:10 +01:00
Werner Koch 79f08fb069 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.
2012-12-28 17:17:56 +01:00
Werner Koch 564d10ea5c kbxutil: Improve format of the Sig-Expire lines.
* kbx/keybox-dump.c (_keybox_dump_blob): Print the expirate timestamp.
2012-12-28 17:07:37 +01:00
Werner Koch a986383424 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.
2012-12-28 14:05:27 +01:00
Werner Koch f7495f1004 kbxutil: Print algo number and fold similar lines.
* 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-12-28 13:45:41 +01:00
Werner Koch 91e61d5253 gpg: First patches to support a keybox storage backend.
* kbx/keybox-defs.h (_keybox_write_header_blob): Move prototype to ..
* kbx/keybox.h: here.
* kbx/keybox-init.c (keybox_lock): Add dummy function
* g10/keydb.c: Include keybox.h.
(KeydbResourceType): Add KEYDB_RESOURCE_TYPE_KEYBOX.
(struct resource_item): Add field kb.
(maybe_create_keyring_or_box): Add error descriptions to diagnostics.
Add arg IS_BOX.  Write a header for a new keybox file.
(keydb_add_resource): No more need for the force flag.  Rename the
local variable "force" to "create".  Add URL scheme "gnupg-kbx".  Add
magic test to detect a keybox file.  Add basic support for keybox.
(keydb_new, keydb_get_resource_name, keydb_delete_keyblock)
(keydb_locate_writable, keydb_search_reset, keydb_search2): Add
support for keybox.
(lock_all, unlock_all): Ditto.
* g10/Makefile.am (needed_libs): Add libkeybox.a.
(gpg2_LDADD, gpgv2_LDADD): Add KSBA_LIBS as a workaround.

* g10/keydb.h (KEYDB_RESOURCE_FLAG_PRIMARY)
KEYDB_RESOURCE_FLAG_DEFAULT, KEYDB_RESOURCE_FLAG_READONLY): New.
* g10/gpg.c, g10/gpgv.c (main): Use new constants.
--

I did most of these changes back in 2011 and only cleaned them up
now.  More to follow soon.
2012-12-27 15:04:42 +01:00
David Prévot ba591e2f14 Fix typos spotted during translations
* 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-08-24 09:44:33 +02:00
Werner Koch 096e7457ec Change all quotes in strings and comments to the new GNU standard.
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-06-05 19:29:22 +02:00
Werner Koch eb0faef81d common: Add a global variable to for the default error source.
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.
2012-02-06 20:50:47 +01:00
Werner Koch 2336b09779 Generate the ChangeLog from commit logs.
* scripts/gitlog-to-changelog: New script.  Taken from gnulib.
* scripts/git-log-fix: New file.
* scripts/git-log-footer: New file.
* doc/HACKING: Describe the ChangeLog policy
* ChangeLog: New file.
* Makefile.am (EXTRA_DIST): Add new files.
(gen-ChangeLog): New.
(dist-hook): Run gen-ChangeLog.

Rename all ChangeLog files to ChangeLog-2011.
2011-12-01 11:09:02 +01:00
Werner Koch 816bee1fa0 Fixed set but unused variable bugs 2011-08-10 14:11:30 +02:00
Werner Koch 740629de00 Update OpenPGP parser to support ECC 2011-04-28 20:21:14 +02:00
Werner Koch b008274afd Nuked almost all trailing white space.
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.
2011-02-04 12:57:53 +01:00
Werner Koch 90b0ff23b7 Editorial changes and allow building with old libgcrypts.
Changed order of some conditional to make to put the special case into
the true branch.  Indentation changes.  Minor other changes to make the
ECC code more similar to the rest of our code.

It builds but many sefltests still fail.  Need to fix that before
using it with an ECDH enabled libgcrypt.

[/]
2011-01-21  Werner Koch  <wk@g10code.com>

	* configure.ac: Need Libgcrypt 1.4.6 due to AESWRAP.
	(HAVE_GCRY_PK_ECDH): Add new test.

[agent/]
2011-01-21  Werner Koch  <wk@g10code.com>

	* cvt-openpgp.c (GCRY_PK_ECDH) [!HAVE_GCRY_PK_ECDH]: New.

[include/]
2011-01-21  Werner Koch  <wk@g10code.com>

	* cipher.h (GCRY_PK_USAGE_CERT): Remove compatibility macros
	because we now require libgcrypt 1.4.6.
	(GCRY_PK_ECDH): Add replacement.
2011-01-21 12:00:57 +01:00
Andrey Jivsov e0972d3d96 Integrating http://code.google.com/p/gnupg-ecc/source/detail?r=15 .
The following works:
   gpg2 --gen-key (ECC)
   gpg2 --list-keys
   gpg2 --list-packets ~/.gnupg/pubring.gpg
   gpg2 --list-packets <private key from http://sites.google.com/site/brainhub/pgpecckeys>

ECDH doesn't work yet as the code must be re-written to adjust for gpg-agent refactoring.
2011-01-05 17:33:17 -08:00
Werner Koch 9c2a8b60a2 fix reallocation bug 2010-07-23 12:30:34 +00:00
Werner Koch a1412b05de More changes on the way to remove secring.gpg. 2010-04-21 16:26:17 +00:00
Marcus Brinkmann 0e960d940a common/
2010-04-20  Marcus Brinkmann  <marcus@g10code.de>

	* logging.c (do_log_ignore_arg): New helper function.
	(log_string): Use it to remove ugly volatile hack that causes gcc
	warning.
	(log_flush): Likewise.
	* sysutils.c (gnupg_unsetenv) [!HAVE_W32CE_SYSTEM]: Return something.
	(gnupg_setenv) [!HAVE_W32CE_SYSTEM]: Likewise.
	* pka.c (get_pka_info): Solve strict aliasing rule violation.
	* t-exechelp.c (test_close_all_fds): Use dummy variables to
	silence gcc warning.

kbx/
2010-04-20  Marcus Brinkmann  <marcus@g10code.de>

	* keybox-update.c [!HAVE_DOSISH_SYSTEM]: Include
	../common/sysutils.h even then to silence gcc warning about
	missing declaration of gnupg_remove.

tools/
2010-04-20  Marcus Brinkmann  <marcus@g10code.de>

	* gpgconf-comp.c (option_check_validity): Use dummy variables to
	silence gcc warning.
2010-04-20 01:11:35 +00:00
Werner Koch f080b353ed More changes for CE. gpgsm does now build and run a keylisting. 2010-03-24 12:15:30 +00:00
Werner Koch e64038608b More chnages to use estream. Add a way to replace the standard
descriptors.
2010-03-22 12:46:05 +00:00
Werner Koch d8b1099d01 Merged jnlib into common. 2010-03-10 12:24:58 +00:00
Werner Koch 40a78fab0c Use macros for iobuf ioctls. 2010-03-08 17:05:37 +00:00
Werner Koch af935bd410 Implement --faked-systrem-time for gpg.
Typo and comment fixes.
2009-12-17 17:25:26 +00:00
Werner Koch 9a96043be4 Unification of the search descriptor usage. 2009-12-08 16:30:33 +00:00
Werner Koch 0792525d22 Make bug reporting address easier changeable. 2009-07-21 14:21:05 +00:00
Werner Koch 2e0ce7d97f Fixed a bunch of little bugs as reported by Fabian Keil.
Still one problem left; marked with a gcc #warning.
2009-06-24 14:03:09 +00:00
Werner Koch a9c317a95c New gpg-agent command to list key information.
Gpgsm does now print the S/N of cards.
Consider ephemeral keys during listing an export.
2009-03-06 17:31:27 +00:00
Werner Koch 382d2f8efb Minor fixes. 2008-12-09 08:58:02 +00:00
Werner Koch b7ff1109f9 Fixed a temporary file name collision between gpg and gpgsm under Windows. 2008-11-20 16:26:40 +00:00
Werner Koch abaa732d6b Reorder libs in kbx. 2008-11-11 11:45:17 +00:00
Werner Koch 0a5f742466 Marked all unused args on non-W32 platforms. 2008-10-20 13:53:23 +00:00
Werner Koch 4254e90426 Fixed bug#907.
Fixed a segv in keybox and made it more robust.
2008-05-06 14:03:36 +00:00
Werner Koch 80f77d79c5 Fix a problem with dirmngr looked up certificates.
Typo fixes.
2008-04-01 15:08:57 +00:00
Werner Koch 6a78bca874 Fixed an email/DN bug.
Changed pinentry prompts.
2008-03-13 08:46:08 +00:00
Werner Koch 843d6c69ef Fixed a W32 crash in gpg2 when creating a new keyring.
Typo fixes.
2008-01-29 16:04:57 +00:00
Werner Koch 503f91e0ae tryu harder to ignore duplicate specified keyrings and -boxes.
Documentation updates.
2007-08-24 09:34:39 +00:00
Werner Koch 698ba5ae3c Add new features to kbxutil.
Fixed bug 829 (can't encrypt if duplicated certs are in the keybox)
2007-08-23 17:41:22 +00:00
Werner Koch 93d3811abc Changed to GPLv3.
Removed intl/.
2007-07-04 19:49:40 +00:00
Werner Koch a7fe86bc02 More W32 related changes 2007-06-26 13:48:44 +00:00
Werner Koch 915b7b21fd Build fixes for W32 2007-06-15 14:27:31 +00:00
Werner Koch 0cfbfd6186 A whole bunch of changes to allow building for Windows.
See the ChangeLogs for details.
2007-06-14 17:05:07 +00:00
Werner Koch 2c9791db55 First steps towards supporting W32.
This is mainly source code reorganization.
Update gnulib.
g10/ does currently not build.
2007-06-06 18:12:30 +00:00
Werner Koch b89d98e335 Improved logging for error orginating from libgcrypt. 2007-04-20 16:59:37 +00:00
Werner Koch 12cc96a176 kbx/
* keybox.h (KEYBOX_FLAG_BLOB_SECRET, KEYBOX_FLAG_BLOB_EPHEMERAL):
	New.
	* keybox-update.c (keybox_compress): Use it here instead of a
	magic constant.
sm/
	* fingerprint.c (gpgsm_get_fingerprint): Add caching.
	(gpgsm_get_fingerprint_string): Use bin2hexcolon().
	(gpgsm_get_fingerprint_hexstring): Use bin2hex and allocate only
	as much memory as required.
	(gpgsm_get_keygrip_hexstring): Use bin2hex.

	* certchain.c (gpgsm_validate_chain): Keep track of the
	certificate chain and reset the ephemeral flags.
	* keydb.c (keydb_set_cert_flags): New args EPHEMERAL and MASK.
	Changed caller to use a mask of ~0.  Return a proper error code if
	the certificate is not available.
2007-03-20 16:57:40 +00:00
Werner Koch b861561e47 Included LIBICONV in all Makefiles.
g10/
	* passphrase.c (passphrase_get): Set the cancel flag on all error
	from the agent.  Fixes a bug reported by Tom Duerbusch.
sm/
	* gpgsm.c (main): Let --gen-key print a more informative error
	message.
2007-01-31 14:24:41 +00:00
Werner Koch 7eec2efa66 Added LIBINTL to more Makefile targets.
doc/
	* com-certs.pem: Added the current root certifcates of D-Trust and
	S-Trust.

g10/
	* status.c (write_status_begin_signing): New.
	* sign.c (sign_file, sign_symencrypt_file): Call it.
	* textfilter.c (copy_clearsig_text): Call it.

	* call-agent.c (agent_scd_pksign): Pass --hash-rmd160 to SCD if
	required.

	* gpg.c (main): Let --no-use-agent and --gpg-agent-info print a
	warning.  
	* misc.c (obsolete_option): New.
2007-01-30 20:16:28 +00:00
Werner Koch 5885142c83 Made some PIN pads work.
Some cleanups for 64 bit CPUs.
2006-11-20 16:49:41 +00:00
Werner Koch 58785c880d Allow to select X.509 certificates using the keygrip. 2006-10-20 11:38:48 +00:00
Werner Koch c69dc436ce Cleanups. 2006-09-20 11:01:49 +00:00
Werner Koch 03d3322e5f Take advantage of newer gpg-error features. 2006-09-14 16:50:33 +00:00
Werner Koch f98537733a Updated FSF's address. 2006-06-20 17:21:37 +00:00
Werner Koch 6a13cf2c3d Preparing an interim release 2005-11-28 11:52:25 +00:00
Marcus Brinkmann 41e8fded0a agent/
2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (gpg_protect_tool_LDADD): Add ../gl/libgnu.a.
	(gpg_preset_passphrase_LDADD, t_common_ldadd): Likewise.
	(gpg_agent_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a.

kbx/
2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (kbxutil_LDADD): Add ../gl/libgnu.a after
	../jnlib/libjnlib.a.

scd/
2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (scdaemon_LDADD): Add ../gl/libgnu.a after
	../common/libcommon.a.
sm/
2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (gpgsm_LDADD): Add ../gl/libgnu.a after
	../common/libcommon.a.

tools/
2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (gpgconf_LDADD): Add ../gl/libgnu.a after
	../common/libcommon.a.
	(symcryptrun_LDADD, gpg_connect_agent_LDADD, gpgkey2ssh_LDADD):
	Likewise.
2005-10-08 00:13:27 +00:00
Werner Koch deeba405a9 gcc-4 defaults forced me to edit many many files to get rid of the
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.
2005-06-16 08:12:03 +00:00
Werner Koch cad9562436 * configure.ac (gl_INIT): Add gnulib stuff.
(fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS
by a simple check.
(putc_unlocked): Removed check.  Not used.
(strsep, mkdtemp, asprintf): Replaced checks by gnulib checks.
(xsize): Added will probably come handy soon.
(CFLAGS): Use -Wformat-security instead of
-Wformat-nonliteral. Add --Wno-format-y2k.
* gl/, gl/m4/: New.

* gpg-agent.c: Include setenv.h.

* Makefile.am (AM_CPPFLAGS): Added.

* util.h: Add some includes for gnulib.
(ttyname, isascii): Define them inline.
* fseeko.c, ftello.c: Removed.
* strsep.c, mkdtemp.c: Removed.
* ttyname.c, isascii.c: Removed.

* mkdtemp.c: Removed.
* exec.c: Include mkdtemp.h

* keybox-file.c (ftello) [!HAVE_FSEEKO]: New replacement
function.  Copied from ../common/ftello.c.
* keybox-update.c (fseeko) [!HAVE_FSEEKO]: New replacement
function.  Copied from ../common/iobuf.c.

* scdaemon.c: Include mkdtemp.h.

* misc.c: Include setenv.h.

* symcryptrun.c: Include mkdtemp.h.
2005-06-01 15:46:01 +00:00
Werner Koch 3666a2859b Avoid the " map_to_assuan_status called with no error source" diagnostic. 2004-12-18 10:22:10 +00:00
Werner Koch 98f0a18e77 (keybox_release): Close the file pointer. 2004-12-07 18:07:30 +00:00
Werner Koch 4a73d94757 First take on a W32 port 2004-12-02 07:48:09 +00:00
Werner Koch c5487b7982 typo fix 2004-10-20 08:55:26 +00:00
Werner Koch 048635bede * gpgv.c (i18n_init): Always use LC_ALL.
* 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-09-30 21:37:11 +00:00
Werner Koch 335b5e4ac4 Preparing a new release. Updated gettext 2004-09-30 14:34:34 +00:00
Werner Koch 2a09a35ad0 * kbxutil.c: New command --import-openpgp.
(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-08-24 19:55:47 +00:00
Werner Koch a1dfa88e52 * keybox-dump.c (_keybox_dump_file): New arg STATS_ONLY.
(update_stats): New.
* kbxutil.c (main): New command --stats.
2004-06-18 09:53:56 +00:00
Werner Koch 6aaceac7fe The keybox gets now compressed after 3 hours and ephemeral
stored certificates are deleted after about a day.
2004-04-26 08:09:25 +00:00
Werner Koch d70bc68c30 Include jnlib/types.h and remove our own
definitions for byte.u16 and u32.
2004-04-20 14:16:55 +00:00
Werner Koch d84d632583 * configure.ac: Require libgcrypt 1.1.94.
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
2004-04-06 10:01:04 +00:00
Werner Koch 5bda9a8e74 * keybox.h (keybox_flag_t): New.
* keybox-search.c (get_flag_from_image, keybox_get_flags): New.
(_keybox_get_flag_location): New.

* certchain.c (gpgsm_validate_chain): Mark revoked certs in the
keybox.

* keylist.c (list_cert_colon): New arg VALIDITY; use it to print a
revoked flag.
(list_internal_keys): Retrieve validity flag.
(list_external_cb): Pass 0 as validity flag.
* keydb.c (keydb_get_flags, keydb_set_flags): New.
(keydb_set_cert_flags): New.
(lock_all): Return a proper error code.
(keydb_lock): New.
(keydb_delete): Don't lock but check that it has been locked.
(keydb_update_keyblock): Ditto.
* delete.c (delete_one): Take a lock.
2004-02-02 17:09:35 +00:00
Werner Koch 30948e5ecd comment typo fixes. 2004-01-16 17:42:08 +00:00
Werner Koch e4cea09fe1 Replaced deprecated type names 2003-12-17 12:27:21 +00:00
Werner Koch dba40e5e45 Mainly changes to adjust for the changed KSBA API. 2003-11-12 15:17:44 +00:00
Repo Admin 9ca4830a5b This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
2003-08-05 17:11:04 +00:00
Repo Admin 7250331472 This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
2003-06-05 07:14:21 +00:00
Repo Admin 82a17c9fb3 This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
2002-10-19 07:55:27 +00:00
Werner Koch 2f4b415fbc Renamed some configure flags. 2002-08-16 14:23:23 +00:00
Werner Koch 9c86904866 Minor changes for gettext 2002-08-10 11:25:32 +00:00
Werner Koch 69f389096d * keybox-search.c (blob_cmp_fpr_part): New.
(has_short_kid, has_long_kid): Implemented.
2002-08-10 09:14:08 +00:00
Werner Koch 508ce100c9 * keybox-defs.h: New BLOBTYPTE_EMPTY.
* keybox-dump.c (_keybox_dump_blob): Handle new type.
* keybox-file.c (_keybox_read_blob): Skip over empty blobs.  Store
the file offset.
* keybox-blob.c (_keybox_new_blob): Add new arg OFF.
(_keybox_get_blob_fileoffset): New.
* keybox-update.c (keybox_delete): Implemented.
2002-07-22 10:21:04 +00:00
Werner Koch 031a856a7e * keybox-init.c (keybox_set_ephemeral): New.
* keybox-blob.c (create_blob_header): Store epheermal flag.
(_keybox_create_x509_blob): Pass epheermal flag on.
* keybox-update.c (keybox_insert_cert): Ditto.
* keybox-search.c (blob_get_blob_flags): New.
(keybox_search): Ignore ephemeral blobs when not in ephemeral mode.

* keybox-dump.c (_keybox_dump_blob): Print blob flags as strings.
2002-06-19 08:29:41 +00:00
Werner Koch 2a2d713359 * keybox-search.c (blob_cmp_mail): Use case-insensitive compare
because mail addresses are in general case insensitive (well
RFC2822 allows for case sensitive mailbox parts, but this is in
general considired a Bad Thing). Add additional substr parameter
to allow for substring matches within the mail address.  Change
all callers to pass this along.
(blob_cmp_name): Likewise but do the case-insensitive search only
in sub string mode.
(keybox_search): Implement MAILSUB and SUBSTR mode.

* stringhelp.c (ascii_memcasemem): New.
2002-02-25 18:18:18 +00:00
Werner Koch e610a0aa21 * keybox-search.c (keybox_search): Allow KEYDB_SEARCH_MODE_FPR20. 2002-01-21 12:03:25 +00:00
Werner Koch 9dd0040085 * keybox-search.c (blob_cmp_fpr): New.
(has_fingerprint): Implemented;
2002-01-15 13:02:25 +00:00
Werner Koch b65e1cf90a * keybox-blob.c (_keybox_create_x509_blob): Skip the leading
parenthesis of the serial number's S-exp.
(_keybox_create_x509_blob): And fixed length calculation.
(create_blob_header): Don't add an offset when writing the serial.
2001-12-20 16:50:13 +00:00
Werner Koch 3341f8a55d * keybox-blob.c (_keybox_create_x509_blob): Skip the leading
parenthesis of the serial number's S-exp.
2001-12-20 13:24:49 +00:00
Werner Koch 86521773df * Makefile.am (AM_CPPFLAGS): Add flags for libksba
* Makefile.am (AM_CPPFLAGS): Include flags for gcrypt and ksba
* Makefile.am: Use LIBGCRYPT macros
2001-12-18 19:35:12 +00:00
Werner Koch 56172ce393 Changes to be used with the new libksba interface.
libgcrypt-1.1.5 is required (cvs or tarball)
2001-12-18 17:37:48 +00:00
Werner Koch f82bdf6e94 * keybox-search.c (blob_cmp_name): There is no terminating 0 stored
for the uid; fixed length compare.
2001-12-15 16:19:08 +00:00
Werner Koch 134d401a4e * keybox-blob.c (x509_email_kludge): New.
(_keybox_create_x509_blob): Insert an extra email address if the
subject's DN has an email part.
* keybox-defs.h: Added the xtoi_2 and digitp macros.
2001-12-14 20:48:07 +00:00
Werner Koch 7606e3b33a * util.h (digitp, hexdigitp): New ctype like macros.
(atoi_1,atoi_2,atoi_4,xtoi_1,xtoi_2): New.

* command.c: Removed the conversion macros as they are now in
../common/util.h.
2001-12-14 13:43:42 +00:00
Werner Koch e4f9871d91 * keybox-search.c (blob_cmp_name): Kludge to allow searching for
more than one name.
(has_subject_or_alt): New.
(blob_cmp_mail): New.
(has_mail): New.
(keybox_search): Implemented exact search and exact mail search.

* kbx/keybox-blob.c (_keybox_create_x509_blob): Insert alternate
names.
2001-12-13 13:10:58 +00:00
Werner Koch f463880562 New searchmode and hack to allow a hex encoded serial number 2001-12-11 12:28:17 +00:00
Werner Koch bab7fa0b29 Added new directory common to enable sharing of some code and error
numbers between gpg, gpgsm and gpg-agent.  Move some files and code to
there.
2001-11-24 17:43:43 +00:00
Werner Koch 0f26760d9f Base code for gpgsm --verify does work 2001-11-16 17:56:23 +00:00
Werner Koch 90d060c199 We have reached a state where we are able to import certs and
check the certification path.
2001-11-13 12:50:14 +00:00
Werner Koch 6dec3847d8 A Makefile is a pretty useful thing 2001-11-10 18:11:10 +00:00
Werner Koch fcfec25620 Started with keybox implementation by basing it on code from the GnuPG
devel branch.
2001-11-10 18:06:11 +00:00