aboutsummaryrefslogtreecommitdiffstats
path: root/g10/passphrase.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * keydb.h, passphrase.c (next_to_last_passphrase): New. "Touch" aDavid Shaw2006-01-171-18/+11
| | | | | | | | | | | | | 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.
* Add "help" sub option to --*-options.Werner Koch2005-09-071-1/+1
|
* * g10.c (main), passphrase.c (set_passphrase_from_string): NewDavid Shaw2005-08-051-0/+13
| | | | | | --passphrase command line option. Only useful in very special circumstances.
* Converted all m_free to xfree etc.Werner Koch2005-07-271-34/+34
|
* * passphrase.c (agent_get_passphrase): Make sure to release theWerner Koch2005-07-261-4/+29
| | | | | | | | | 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.
* * signal.c [HAVE_DOSISH_SYSTEM]: Fix unused function warnings on mingw32.David Shaw2005-06-011-9/+2
| | | | | | | Noted by Joe Vender. * passphrase.c [_WIN32]: Remove unused variables.
* Updated FSF street address and preparations for a release candidate.Werner Koch2005-05-311-1/+2
|
* * passphrase.c (ask_passphrase): Unescape the description string.Werner Koch2005-05-241-1/+10
| | | | | | | * cardglue.c (unescape_status_string): Removed. Changed all caller to use ... * misc.c (unescape_percent_string): New.
* (ccid_transceive): Arghhh. The seqno is anotherWerner Koch2005-05-201-18/+35
| | | | | | bit in the R-block than in the I block, this was wrong at one place. Fixes bug #419 and hopefully several others.
* * passphrase.c (agent_get_passphrase): Add new arg CACHEID.Werner Koch2005-05-031-23/+48
| | | | | | | | | | | | | | 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.
* Changes to make use of code taken from libassuan. This replaces theWerner Koch2005-04-051-570/+199
| | | | | | | old ad-hoc connection code to gpg-agent. We do need this for the forthcoming diversion of card code to an already running gpg-agent with card-support.
* * gpg.sgml: Add bkuptocard command for --edit-key.Werner Koch2005-02-151-8/+13
| | | | | | | | * passphrase.c (agent_get_passphrase): Don't call free_public_key if PK is NULL. (passphrase_clear_cache): Ditto. Removed debug output. (passphrase_to_dek): Ditto.
* * passphrase.c (readline, agent_send_option, agent_open,David Shaw2005-01-101-7/+5
| | | | | | agent_get_passphrase, passphrase_clear_cache): Rename readline() to readaline() to keep readline library namespace clear.
* * keyedit.c (keyedit_menu): Invisible alias "passwd" as "password".David Shaw2004-12-201-2/+2
| | | | | | | | | | | * passphrase.c: Don't check for __CYGWIN__, so it is treated as a unix-like system. * options.h, g10.c (main), textfilter.c (standard): Use new option --rfc2440-text to determine whether to filter "<space>\t\r\n" or just "\r\n" before canonicalizing text line endings. Default to "<space>\t\r\n".
* * passphrase.c (agent_get_passphrase): Define NREAD locally asWerner Koch2004-12-171-1/+3
| | | | | | | | size_t or int. * keylist.c (list_keyblock_print): Make field width an int. * keyedit.c (show_key_with_all_names): Ditto.
* automake updates, removed one debug outputV1-3-93Werner Koch2004-12-141-1/+0
|
* (read_passphrase_from_fd): Fixed memory leak.Werner Koch2004-12-131-1/+4
| | | | | Noted by Andrei Darashenka.
* * passphrase.c (agent_get_passphrase): New args CUSTOM_PROMPT andWerner Koch2004-12-091-10/+39
| | | | | | | | | | | | | | | | | | | | | CUSTOM_DESCRIPTION. Changed all callers. * app-openpgp.c (do_getattr, do_learn_status, do_setattr): Support the new private DOs. (do_change_pin): Add a "N" prefix to the strings so that the callback can act accordingly for a new PIN. Unfortunately this breaks existing translations but I see no wother way to overvome this. * cardglue.c (learn_status_cb): Ditto. (agent_release_card_info): Ditto. (struct pin_cb_info_s): Removed and changed all users. (pin_cb): Reworked. * card-util.c (card_status): Print them (card_edit): New command PRIVATEDO. (change_private_do): New.
* (open_info_file): New.Werner Koch2004-11-171-11/+17
| | | | | | | | (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-11-03 Timo Schulz <[email protected]>Timo Schulz2004-11-031-64/+73
| | | | | | | | * strgutil.c (w32_strerror): New. * ttyio.c (init_ttyfp, tty_printf, do_get): Use it here. * iobuf.c (fd_cache_open, file_filter): Likewise. (iobuf_seek, translate_file_handle): Likewise.
* * skclist.c (build_sk_list): Don't need to warn about PGP-generatedDavid Shaw2004-10-281-4/+5
| | | | | | | | | | | | | | | | | Elgamal signing keys since we no longer support any Elgamal signing keys. * sign.c (sign_file, clearsign_file): Use "writing to" instead of "writing to file" to match other strings. * pkclist.c (check_signatures_trust): Fix typo. Noted by Moray Allan. This is Debian bug #278708. * passphrase.c (ask_passphrase, passphrase_to_dek): "password" -> "passphrase". * keyedit.c (show_key_with_all_names): Show designated revoker as part of translatable string.
* * card-util.c, delkey.c, keygen.c, plaintext.c, keyedit.c, passphrase.c,David Shaw2004-10-281-2/+2
| | | | | | revoke.c: Collapse the two different "can't do that in batch mode" strings into one.
* (agent_send_all_options): Try to deduce the ttynameWerner Koch2004-10-261-2/+6
| | | | | from stdin.
* (agent_get_passphrase): Cast UIDLEN to int. NotedWerner Koch2004-10-171-1/+1
| | | | | by Christian Cornelssen.
* * README: Mentioned --enable-selinux-support.Werner Koch2004-10-151-3/+0
| | | | | | | | | | | | | * status.h (STATUS_NEED_PASSPHRASE_PIN): New. * status.c (get_status_string): Added. * passphrase.c (ask_passphrase): Moved status printing to .. * cardglue.c (pin_cb): .. here and issue new status message. * keyedit.c (sign_uids): Don't include the leading LF in the translatable string but print them separately. * apdu.c (apdu_open_remote_reader) [_WIN32]: We don't have ENOSYS.
* * helptext.c, pkclist.c (do_we_trust): It is not possible to get here withDavid Shaw2004-10-061-6/+4
| | | | | | | | | | | | | a revoked or expired key, so BUG() that case. Remove question about overriding revoked/expired. Also --keyid-format-ify. (do_we_trust_pre): Use print_pubkey_info() instead of printing the info ourselves. * passphrase.c (passphrase_to_dek): Improve translatability of user ID prompts. * keylist.c (print_pubkey_info): Use the user ID the pk was selected by, if any.
* * passphrase.c (agent_get_passphrase): Use keystrs for agent strings, andDavid Shaw2004-10-051-14/+20
| | | | | | | | | | fix sprintf warnings. * keyserver.c (keyserver_spawn): Fix BUG() with certain sets of mixed regular and preferred keyserver refreshes. Noted by Sebastian Wiesinger. * keyedit.c (show_key_with_all_names): Show uid validity in menu.
* * main.h: Create S2K_DIGEST_ALGO macro so we do not need to always setDavid Shaw2004-09-241-1/+1
| | | | | | | | | | | opt.s2k_digest_algo. This helps fix a problem with PGP 2.x encrypted symmetric messages. Change all callers (encode.c, g10.c, keyedit.c, keygen.c, passphrase.c, sign.c). * armor.c, cardglue.c, getkey.c, import.c, keygen.c: Be consistent in some more quoted strings. Always use 'user ID', not 'user id', "quotes" for user IDs, etc.
* 2004-08-18 Marcus Brinkmann <[email protected]>Marcus Brinkmann2004-08-181-3/+5
| | | | | * passphrase.c (agent_get_passphrase):
* * free-packet.c (copy_secret_key): Fixed memory leak when D is notWerner Koch2004-06-161-1/+20
| | | | | | | | NULL. * passphrase.c (passphrase_to_dek): Added a few comments to the code.
* * getkey.c (merge_selfsigs_subkey): Do not mark subkeys valid if we do notDavid Shaw2004-03-051-1/+1
| | | | | | | | | support their pk algorithm. This allows for early (during get_*) rejection of a subkey, and selection of another. * passphrase.c (passphrase_to_dek): Give a little more information when we have room to do so.
* * revoke.c (export_minimal_pk), export.c (do_export_stream), passphrase.cDavid Shaw2004-03-051-4/+14
| | | | | | | | | | | (passphrase_to_dek), keyserver.c (print_keyrec): A few more places to use --keyid-format. * options.h, g10.c (main), export.c (parse_export_options, do_export_stream): Remove --export-all and the "include-non-rfc" export-option as they are no longer meaningful with the removal of v3 Elgamal keys.
* * passphrase.c (ask_passphrase): Add optional promptid arg.Werner Koch2003-10-211-2/+4
| | | | | | | | | | | | | | | | | | | 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.
* * keygen.c (do_add_key_flags, parse_parameter_usage): Add supportWerner Koch2003-09-301-15/+50
| | | | | | | | | | | | | | | | | 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.
* * passphrase.c (agent_send_all_options): Make use of $GPG_TTY.David Shaw2003-08-291-9/+13
| | | | | | | | | | * g10.c (main): Disable use-agent if passphrase-fd is given later. Suggested by Kurt Garloff. * exec.c, g10.c, gpgv.c, passphrase.c, photoid.c: s/__MINGW32__/_WIN32/ to help building on native Windows compilers. Requested by Brian Gladman. From Werner on stable branch.
* * passphrase.c (read_passphrase_from_fd): Do a dummy read if theWerner Koch2003-04-101-34/+107
| | | | | | | | | | | | | | | | | | | | | agent is to be used. Noted by Ingo Kl�cker. (agent_get_passphrase): Inhibit caching when we have no fingerprint. This is required for key generation as well as for symmetric only encryption. * passphrase .c (agent_get_passphrase): New arg CANCELED. (passphrase_to_dek): Ditto. Passed to above. Changed all callers to pass NULL. * seckey-cert.c (do_check): New arg CANCELED. (check_secret_key): Terminate loop when canceled. * keyedit.c (change_passphrase): Pass ERRTEXT untranslated to passphrase_to_dek and translate where appropriate. * seckey-cert.c (check_secret_key): Ditto. * keygen.c (ask_passphrase): Ditto. * passphrase.c (agent_get_passphrase): Translate the TRYAGAIN_TEXT. Switch the codeset to utf-8.
* * options.h, g10.c (main), keyserver.c (kopts): Add "try-dns-srv"David Shaw2003-03-111-5/+8
| | | | | | | | | keyserver option. Defaults to on. * passphrase.c (agent_get_passphrase): Fix memory leak with symmetric messages. Fix segfault with symmetric messages. Fix incorrect prompt with symmetric messages.
* * encode.c (encode_simple), passphrase.c (passphrase_to_dek), sign.cDavid Shaw2002-11-241-4/+1
| | | | | | (sign_symencrypt_file): Use --s2k-digest-algo for passphrase mangling rather than --digest-algo.
* * exec.c [__CYGWIN32__]: Keep cygwin separate from Mingw32; we don't needDavid Shaw2002-11-131-7/+7
| | | | | | | | | | | | | | | it here as it behaves more like a Posix system. From Werner on stable branch. * passphrase.c (agent_get_passphrase): Ditto. From Werner on stable branch. * tdbio.c (MY_O_BINARY): Need binary mode with Cygwin. From Werner on stable branch. * g10.c, gpgv.c (main) [__CYGWIN32__]: Don't get the homedir from the registry. From Werner on stable branch.
* * keyedit.c (show_key_with_all_names_colon): Make --with-colons --editDavid Shaw2002-11-131-1/+1
| | | | | | | | | | | | | | | | display match the validity and trust of --with-colons --list-keys. * passphrase.c (agent_send_all_options): Fix compile warning. * keylist.c (list_keyblock_colon): Validity for subkeys should match that of the primary key, and not that of the last user ID. * getkey.c (merge_selfsigs): Revoked/expired/invalid primary keys carry these facts onto all their subkeys, but only after the subkey has a chance to be marked valid. This is to fix an incorrect "invalid public key" error verifying a signature made by a revoked signing subkey, with a valid unrevoked primary key.
* * passphrase.c (agent_send_all_options): Use tty_get_ttyname toWerner Koch2002-11-091-2/+2
| | | | | get the default ttyname.
* * pubkey-enc.c (get_session_key): With hidden recipients or try a givenDavid Shaw2002-11-061-2/+3
| | | | | | | | | | | | | | | passphrase against all secret keys rather than trying all secret keys in turn. Don't if --try-all-secrets or --status-fd is enabled. * passphrase.c (passphrase_to_dek): Mode 1 means do a regular passphrase query, but don't prompt with the key info. * seckey-cert.c (do_check, check_secret_key): A negative ask count means to enable passphrase mode 1. * keydb.h, getkey.c (enum_secret_keys): Add flag to include secret-parts-missing keys (or not) in the list.
* * import.c (import_keys_internal): s/inp/inp2/ to avoid shadowingWerner Koch2002-10-041-10/+11
| | | | | | | | warning. * passphrase.c (agent_get_passphrase): Fixed signed/unsigned char problem in %-escaping. Noted by Ingo Kl�cker.
* Cleanups and minor fixes.Werner Koch2002-09-101-7/+1
|
* * getkey.c (get_user_id_native): Renamed to ..Werner Koch2002-08-191-1/+1
| | | | | | | | | | | | (get_user_id_printable): this. Filter out all dangerous characters. Checked all usages. (get_user_id_string_native): Renamed to.. (get_user_id_string_printable): this. Filter out all dangerous characters. Checked all usages. * keyedit.c (show_basic_key_info): New. * keylist.c (print_fingerprint): New mode 3. * import.c (import_one): Use new function to display the user ID.
* Update head to match stable 1.0David Shaw2002-06-291-245/+757
|
* See ChangeLog: Mon Sep 18 16:35:45 CEST 2000 Werner KochWerner Koch2000-09-181-1/+0
|
* See ChangeLog: Mon Aug 21 17:59:17 CEST 2000 Werner KochWerner Koch2000-08-211-0/+365
|
* See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch2000-07-141-4/+5
|
* See ChangeLog: Mon Jan 31 16:37:34 CET 2000 Werner KochWerner Koch2000-01-311-1/+0
|