aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keydb.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2011-04-29Re-indentation of keydb.c and error code changes.Werner Koch1-14/+13
Returning -1 as an error code is not very clean given that gpg error has more descriptive error codes. Thus we now return GPG_ERR_NOT_FOUND for all search operations and adjusted all callers.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-4/+4
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-10-13More agent support for gpg.Werner Koch1-4/+1
2010-10-01Exporting secret keys via gpg-agent is now basically supported.Werner Koch1-3/+6
A couple of forward ported changes. Doc updates.
2010-09-06Removed more secret key related code.Werner Koch1-14/+3
It builds fine and passes some of the tests but there are quite some features which don't work yet.
2010-08-31Import OpenPGP keys into the agent.Werner Koch1-0/+5
2010-04-27Provide a useful pinentry prompt.Werner Koch1-0/+3
2010-04-23Decryption and signi via agent is now implemented.Werner Koch1-2/+2
2010-04-21More changes on the way to remove secring.gpg.Werner Koch1-15/+12
2010-04-20Generating an OpenPGP key cia gpg-agent basically works.Werner Koch1-0/+3
2010-02-02Various changes to eventually support openpgp keys in pgp-agent.Werner Koch1-8/+22
Comment fixes. Minor chnages in preparation of a W32CE port.
2010-01-08Add dummu option --passwd for gpg.Werner Koch1-0/+1
Collected changes.
2009-12-08Unification of the search descriptor usage.Werner Koch1-30/+0
2009-09-30Some changes to suport g13.Werner Koch1-8/+14
2009-05-15Made card key generate with backup key work for 2048 bit.Werner Koch1-5/+5
Improved card key generation prompts.
2008-05-07--locate-key now returns several keys if they all match.Werner Koch1-1/+1
2008-04-08Enhanced --auto-key-locate.Werner Koch1-1/+1
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2006-11-05Collected fixes.Werner Koch1-0/+2
2006-10-02Fix for bug 537Werner Koch1-4/+4
2006-08-21Migrated more stuff to doc/Werner Koch1-0/+1
Migrated the gpg regression tests. Some changes tp the gpg code to fix bugs and for the use in testing. make distcheck works now with gpg enabled.
2006-08-16With --enable-gpg the keyservers are now build and a first test using gpg2Werner Koch1-0/+2
shows no prblems. Needs more testing of course.
2006-07-27Preparing a new releasegnupg-1.9.22Werner Koch1-2/+11
2006-06-28* keydb.h, pkclist.c (select_algo_from_prefs, algo_available): Pass aDavid Shaw1-2/+7
union for preference hints rather than doing void * games. * sign.c (sign_file): Use it here.
2006-05-23g10/ does build again.Werner Koch1-0/+1
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-21/+41
The gpg part does not yet build.
2006-02-24* keydb.h, getkey.c (release_akl), gpg.c (main): AddDavid Shaw1-2/+3
--no-auto-key-locate. * options.h, gpg.c (main): Keep track of each keyserver registered so we can match on them later. * keyserver-internal.h, keyserver.c (cmp_keyserver_spec, keyserver_match), gpgv.c: New. Find a keyserver that matches ours and return its spec. * getkey.c (get_pubkey_byname): Use it here to get the per-keyserver options from an earlier keyserver.
2006-02-22* options.h, keydb.h, g10.c (main), getkey.c (parse_auto_key_locate):David Shaw1-0/+1
Parse a list of key access methods. (get_pubkey_byname): Walk the list here to try and retrieve keys we don't have locally.
2006-01-17* keydb.h, passphrase.c (next_to_last_passphrase): New. "Touch" aDavid Shaw1-0/+1
passphrase as if it was used (move from next_pw to last_pw). * pubkey-enc.c (get_session_key): Use it here to handle the case where a passphrase happens to be correct for a secret key, but yet that key isn't the anonymous recipient (i.e. the secret key could be decrypted, but not the session key). This also handles the case where a secret key is located on a card and a secret key with no passphrase. Note this does not fix bug 594 (anonymous recipients on smartcard do not work) - it just prevents the anonymous search from stopping when the card is encountered.
2005-08-06Missed keydb.h entry for set_passphrase_from_stringDavid Shaw1-0/+1
2005-07-26* passphrase.c (agent_get_passphrase): Make sure to release theWerner Koch1-1/+1
saved codeset. (agent_open): Add arg ORIG_CODESET and switch back to it in case of error. Changed all callers. * zh_TW.po, fr.po, cs.po: Updated.
2005-07-09* trustdb.c (clean_uids_from_key): Don't keep a valid selfsig aroundDavid Shaw1-1/+0
when compacting a uid. There is no reason to make an attacker's job easier - this way they only have a revocation which is useless in bringing the uid back. * keydb.h, kbnode.c (undelete_kbnode): Removed. No longer needed. * import.c (chk_self_sigs): Allow a uid revocation to be enough to allow importing a particular uid (no self sig needed). This allows importing compacted uids.
2005-06-10* keydb.h, kbnode.c (undelete_kbnode): New function to undelete aDavid Shaw1-2/+3
kbnode. * trustdb.c (clean_uids_from_key): Further tweak the algorithm so that the last good selfsig is kept when the chosen selfsig is a revocation.
2005-05-31 * keydb.h [!ENABLE_AGENT_SUPPORT]: Define dummy types.Werner Koch1-0/+5
* cardglue.c (assuan_strerror, assuan_transact): Dummy functions if not build with agent support. * zh_TW.po, zh_CN.po, es.po, ro.po: Updated. * tr.po: Updated from TP. Note: this is an exception in general translations from the Robot are not anymore accepted. * regcomp.c (MB_CUR_MAX) [_WIN32]: Define it only if not defined.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-05-20(ccid_transceive): Arghhh. The seqno is anotherWerner Koch1-0/+7
bit in the R-block than in the I block, this was wrong at one place. Fixes bug #419 and hopefully several others.
2005-05-03* passphrase.c (agent_get_passphrase): Add new arg CACHEID.Werner Koch1-2/+3
Changed all callers. (ask_passphrase): Add new arg CACHEID and use it in agent mode. Changed all callers. (passphrase_clear_cache): New arg CACHEID. Changed all callers. * cardglue.c (format_cacheid): New. (pin_cb): Compute a cache ID. (agent_scd_pksign, agent_scd_pkdecrypt): Use it. (agent_clear_pin_cache): New. * card-util.c (change_pin): Clear the PIN cache. (check_pin_for_key_operation): Ditto.
2005-01-20* gpgv.c (tty_fprintf): New stub.Werner Koch1-2/+7
* card-util.c (card_status): Create asecret key stub on the fly and print more information about a card key. * import.c (pub_to_sec_keyblock, auto_create_card_key_stub): New. * getkey.c (get_seckeyblock_byfprint): New. * keylist.c (print_card_key_info): New.
2004-11-17(open_info_file): New.Werner Koch1-1/+3
(main): Unconditionally implement --status-file, --logger-file, --attribute-file, --passphrase-file, --command-file. This is not generally useful but easy to support and might make scripting under Windows easier.
2004-09-23* gpg.sgml: Document "addcardkey" and "keytocard".Werner Koch1-0/+1
* apdu.c (open_pcsc_reader): Do not print empty reader string. * keygen.c (ask_algo): Allow creation of AUTH keys. * keyid.c (usagestr_from_pk): New. * app-openpgp.c (app_openpgp_storekey): Call flush_cache. * keyedit.c (keyedit_menu): New command "keytocard" (keyedit_menu): Bad hack for the not_with_sk element. (show_key_with_all_names): Print the usage. (find_pk_from_sknode): New. * card-util.c (card_store_subkey): New. (copy_mpi): New. * cardglue.c (agent_openpgp_storekey): New.
2004-09-21* keyedit.c (keyedit_menu): Don't show "addcardkey" in the menu if we doDavid Shaw1-1/+1
not have card support. * keydb.h, keyserver.c (print_keyrec, keyserver_spawn): fpr is an array of unsigned bytes.
2004-08-23* keydb.h, getkey.c (get_user_id_printable): Rename to get_user_id_nativeDavid Shaw1-3/+3
and remove the printable stuff since we're print-ifying valid utf8 characters. Change all callers in import.c, sign.c, keylist.c, and encode.c.
2004-05-21* keyserver.c (keyidlist): Go back to the old fast keyid lister. OnlyDavid Shaw1-0/+1
merge selfsigs if we have to for honor-keyserver-url. (keyserver_refresh): Keyserver URL handler moved here. (calculate_keyid_fpr): Removed. * keydb.h, keyid.c (keystr_from_desc): Calculate a key string from a KEYDB_SEARCH_DESC.
2004-03-06* keydb.h, keyid.c (keystr_from_pk, keystr_from_sk): New functions to pullDavid Shaw1-1/+3
a key string from a key in one step. This isn't faster than before, but makes for neater code. * keylist.c (list_keyblock_print): Use keystr_from_xx here. (print_key_data): No need to pass a keyid in.
2004-03-03* options.h, g10.c (main): Add a more flexible --keyid-format option toDavid Shaw1-0/+2
replace the list-option (and eventually verify-option) show-long-keyids. The format can be short, long, 0xshort, and 0xlong. * keydb.h, keyid.c (keystr, keystrlen): New functions to generate a printable keyid. * keyedit.c (print_and_check_one_sig, show_key_with_all_names), keylist.c (list_keyblock_print): Use new keystr() function here to print keyids.
2004-02-11* keyedit.c (keyedit_menu): Prompt for subkey removal for both secret andDavid Shaw1-1/+3
public subkeys. * keylist.c (list_keyblock_print), keyedit.c (show_key_with_all_names): Show the revocation date of a key/subkey, and general formatting work. * packet.h, getkey.c (merge_selfsigs_main, merge_selfsigs_subkey, merge_selfsigs): Keep track of the revocation date of a key. * keydb.h, keyid.c (revokestr_from_pk): New function to print the revocation date of a key.
2004-01-20* g10.c (main), keydb.h, keydb.c (keydb_rebuild_caches), keyring.h,David Shaw1-1/+1
keyring.c (keyring_rebuild_cache): Add "noisy" flag so cache rebuilds can remain noisy when called for itself, and quiet when called as part of the trustdb rebuild. * trustdb.c (validate_keys): Rebuild the sig caches before building the trustdb. Note that this is going to require some architectual re-thinking, as it is agonizingly slow.
2003-12-11* packet.h, build-packet.c (hash_public_key): Remove function ...David Shaw1-3/+2
* keydb.h, keyid.c (hash_public_key, do_fingerprint_md): ... and make a new one here that shares code with the fingerprint calculations. This removes some duplicated functionality, and is also around 14% faster. (Every bit helps). * import.c (import_one): No longer need the Elgamal import warning. * getkey.c (get_pubkey_fast): This one is sort of obscure. get_pubkey_fast returns the primary key when requesting a subkey, so if a user has a key signed by a subkey (we don't do this, but used to), AND that key is not self-signed, AND the algorithm of the subkey in question is not present in GnuPG, AND the algorithm of the primary key that owns the subkey in question is present in GnuPG, then we will try and verify the subkey signature using the primary key algorithm and hit a BUG(). The fix is to not return a hit if the keyid is not the primary. All other users of get_pubkey_fast already expect a primary only.
2003-10-21* passphrase.c (ask_passphrase): Add optional promptid arg.Werner Koch1-2/+2
Changed all callers. * cardglue.c (pin_cb): Use it here, so the machine interface can tell whether the Admin PIN is requested. * cardglue.c (agent_scd_checkpin): New. * misc.c (openpgp_pk_algo_usage): Added AUTH usage. * app-openpgp.c (check_against_given_fingerprint): New. Factored out that code elsewhere. (do_check_pin): New. * card-util.c (card_edit): New command "passwd". Add logic to check the PIN in advance. (card_status): Add new args to return the serial number. Changed all callers.
2003-09-30* keygen.c (do_add_key_flags, parse_parameter_usage): Add supportWerner Koch1-0/+2
the proposed AUTH key flag. * getkey.c (fixup_uidnode, merge_selfsigs_main) (merge_selfsigs_subkey, premerge_public_with_secret): Ditto. * keylist.c (print_capabilities): Ditto. * parse-packet.c (parse_key): Allow to parse the divert-to-card S2K mode. * build-packet.c (do_secret_key): Handle divert-to-card S2K * seckey-cert.c (is_secret_key_protected): Ditto. (check_secret_key): Ditto. * keygen.c (do_ask_passphrase): Renamed from ask_passphrase. * passphrase.c (ask_passphrase): New.