aboutsummaryrefslogtreecommitdiffstats
path: root/sm/keydb.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2011-09-28Add a flag parameter to dotlock_create.Werner Koch1-1/+1
This allows us to extend this function in the future.
2011-09-23Renamed the lock functions.Werner Koch1-6/+6
Also cleaned up the dotlock code for easier readability.
2011-08-10Fixed set but unused variable bugsWerner Koch1-2/+0
2011-04-25Fix regression in gpg's mail address parsing.Werner Koch1-1/+1
Since 2009-12-08 gpg was not able to find email addresses indicated by a leading '<'. This happened when I merged the user id classification code of gpgsm and gpg.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-125/+123
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.
2009-12-08Unification of the search descriptor usage.Werner Koch1-281/+3
2009-09-23s/DOTLOCK/dotlock_t/.Werner Koch1-1/+1
Add some stuff for g13.
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-0/+6
2008-04-01Fix a problem with dirmngr looked up certificates.Werner Koch1-1/+1
Typo fixes.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-03-20kbx/Werner Koch1-4/+16
* 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.
2006-10-20Allow to select X.509 certificates using the keygrip.Werner Koch1-1/+9
2006-10-02Fix for bug 537Werner Koch1-2/+2
2006-09-18Added common certificates.Werner Koch1-5/+9
2006-09-06The big Assuan error code removal.Werner Koch1-1/+1
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2006-05-23g10/ does build again.Werner Koch1-27/+0
2006-05-222006-05-19 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-5/+9
* keydb.c (keydb_insert_cert): Do not lock here, but only check if it is locked. (keydb_store_cert): Lock here. * keydb.h (keydb_delete): Accept new argument UNLOCK. * keydb.c (keydb_delete): Likewise. Only unlock if this is set. * delete.c (delete_one): Add new argument to invocation of keydb_delete.
2005-07-27Removed directories which are only used by the 1.9 branchWerner Koch1-1282/+0
2005-06-16gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch1-4/+5
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-12-06* configure.ac (have_w32_system): New. Disable Pth checks for W32.Werner Koch1-2/+0
Link jnlib/w32-pth.h to pth.h. * Makefile.am (pkglib_PROGRAMS): Build only for W32. * keydb.c: Don't define DIRSEP_S here.
2004-06-06* configure.ac: Require libksba 0.9.7.Werner Koch1-2/+2
* certreqgen.c (get_parameter_uint, create_request): Create an extension for key usage when requested. * gpgsm.c (main): Install emergency_cleanup also as an atexit handler. * verify.c (gpgsm_verify): Removed the separate error code handling for KSBA. We use shared error codes anyway. * export.c (export_p12): Removed debugging code. * encrypt.c (gpgsm_encrypt): Put the session key in to secure memory.
2004-04-28* gpgsm.c: New command --keydb-clear-some-cert-flags.Werner Koch1-3/+98
* keydb.c (keydb_clear_some_cert_flags): New. (keydb_update_keyblock, keydb_set_flags): Change error code CONFLICT to NOT_LOCKED.
2004-04-26The keybox gets now compressed after 3 hours and ephemeralWerner Koch1-0/+15
stored certificates are deleted after about a day.
2004-03-15(list_cert_colon): Hack to set the expired flag.Werner Koch1-2/+2
2004-02-18* gpgsm.c (set_debug): Set the new --debug-level flags.Werner Koch1-0/+2
(main): New option --gpgconf-list. (main): Do not setup -u and -r keys when not required. (main): Setup the used character set. * keydb.c (keydb_add_resource): Print a hint to start the gpg-agent.
2004-02-02* keybox.h (keybox_flag_t): New.Werner Koch1-11/+149
* 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.
2003-12-17Replaced deprecated type names.Werner Koch1-5/+5
* certdump.c (gpgsm_print_serial): Cleaned up cast use in strtoul. (gpgsm_dump_serial): Ditto. * decrypt.c (gpgsm_decrypt): Replaced ERR by RC.
2003-08-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+1282
'GNUPG-1-9-BRANCH'.
2003-06-27Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch1-4/+4
2003-06-04Update error handling to match gpg-error in CVS.Marcus Brinkmann1-9/+9
2003-06-03Make use of libgpg-errorWerner Koch1-25/+25
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-1282/+0
'GNUPG-1-9-BRANCH'.
2002-07-22* keydb.c (keydb_add_resource): Register a lock file.Werner Koch1-9/+27
(lock_all, unlock_all): Implemented.
2002-07-02* keydb.c (keydb_store_cert): Add optional ar EXISTED and changedWerner Koch1-4/+14
all callers. * call-agent.c (learn_cb): Print info message only for real imports. * import.c (gpgsm_import): Moved duplicated code to ... (check_and_store): new function. Added magic to import the entire chain. Print status only for real imports and moved printing code to .. (print_imported_status): New.
2002-06-29* gpgsm.c: New option --auto-issuer-key-retrieve.Werner Koch1-11/+18
* certpath.c (find_up): Try to retrieve an issuer key from an external source and from the ephemeral key DB. (find_up_store_certs_cb): New. * keydb.c (keydb_set_ephemeral): Does now return the old state. Call the backend only when required. * call-dirmngr.c (start_dirmngr): Use GNUPG_DEFAULT_DIRMNGR. (lookup_status_cb): Issue status only when CTRL is not NULL. (gpgsm_dirmngr_lookup): Document that CTRL is optional. * call-agent.c (start_agent): Use GNUPG_DEFAULT_AGENT.
2002-06-20* certlist.c (gpgsm_add_to_certlist): Fixed locating of aWerner Koch1-4/+25
certificate with the required key usage. * gpgsm.c (main): Fixed a segv when using --outfile without an argument. * keylist.c (print_capabilities): Also check for non-repudiation and data encipherment. * certlist.c (cert_usage_p): Test for signing and encryption was swapped. Add a case for certification usage, handle non-repudiation and data encipherment. (gpgsm_cert_use_cert_p): New. (gpgsm_add_to_certlist): Added a CTRL argument and changed all callers to pass it. * certpath.c (gpgsm_validate_path): Use it here to print a status message. Added a CTRL argument and changed all callers to pass it. * decrypt.c (gpgsm_decrypt): Print a status message for wrong key usage. * verify.c (gpgsm_verify): Ditto. * keydb.c (classify_user_id): Allow a colon delimited fingerprint.
2002-06-19* call-agent.c (learn_cb): Use log_info instead of log_error onWerner Koch1-1/+28
successful import. * keydb.c (keydb_set_ephemeral): New. (keydb_store_cert): New are ephemeral, changed all callers. * keylist.c (list_external_cb): Store cert as ephemeral. * export.c (gpgsm_export): Kludge to export epehmeral certificates. * gpgsm.c (main): New command --list-external-keys.
2002-03-05* gpgsm.c, gpgsm.h: Add local_user.Werner Koch1-1/+0
* sign.c (gpgsm_get_default_cert): New. (get_default_signer): Use the new function if local_user is not set otherwise used that value. * encrypt.c (get_default_recipient): Removed. (gpgsm_encrypt): Use gpgsm_get_default_cert. * verify.c (gpgsm_verify): Better error text for a bad signature found by comparing the hashs.
2002-01-15* import.c (gpgsm_import): Just do a basic cert check beforeWerner Koch1-0/+55
storing it. * certpath.c (gpgsm_basic_cert_check): New. * keydb.c (keydb_store_cert): New. * import.c (store_cert): Removed and change all caller to use the new function. * verify.c (store_cert): Ditto. * certlist.c (gpgsm_add_to_certlist): Validate the path * certpath.c (gpgsm_validate_path): Check the trust list. * call-agent.c (gpgsm_agent_istrusted): New.
2002-01-10* base64.c (gpgsm_create_writer): Allow to set the object nameWerner Koch1-7/+5
* server.c (cmd_genkey): New. * certreqgen.c: New. The parameter handling code has been taken from gnupg/g10/keygen.c version 1.0.6. * call-agent.c (gpgsm_agent_genkey): New.
2001-12-20* base64.c (base64_reader_cb): Try to detect an S/MIME body part.Werner Koch1-1/+5
* certdump.c (print_sexp): Renamed to gpgsm_dump_serial, made global. (print_time): Renamed to gpgsm_dump_time, made global. (gpgsm_dump_serial): Take a real S-Expression as argument and print the first item. * keylist.c (list_cert_colon): Ditto. * keydb.c (keydb_search_issuer_sn): Ditto. * decrypt.c (print_integer_sexp): Removed and made callers use gpgsm_dump_serial. * verify.c (print_time): Removed, made callers use gpgsm_dump_time.
2001-12-18Changes to be used with the new libksba interface.Werner Koch1-3/+8
libgcrypt-1.1.5 is required (cvs or tarball)
2001-12-14* keylist.c (list_cert_colon): Kludge to show an email addressWerner Koch1-0/+1
encoded in the subject's DN.
2001-12-11Implemented encryption in server mode.Werner Koch1-0/+275
Allow to specify a recipient on the commandline There is still a default hardwired recipient if none has been set.
2001-11-26* keydb.c (keydb_add_resource): Create keyboxWerner Koch1-127/+120
* keylist.c (gpgsm_list_keys): Fixed non-server keylisting. * server.c (rc_to_assuan_status): New. Use it for all commands.
2001-11-24Added new directory common to enable sharing of some code and errorWerner Koch1-17/+17
numbers between gpg, gpgsm and gpg-agent. Move some files and code to there.
2001-11-16Base code for gpgsm --verify does workWerner Koch1-0/+13
2001-11-13We have reached a state where we are able to import certs andWerner Koch1-202/+355
check the certification path.
2001-11-10We now need a way to store keysWerner Koch1-0/+703