aboutsummaryrefslogtreecommitdiffstats
path: root/g10/passphrase.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-10-21 18:22:21 +0000
committerWerner Koch <[email protected]>2003-10-21 18:22:21 +0000
commit441aeb85f21436b1ae2ecd1de420138016baba57 (patch)
treefc1c2ed359f38e7700ef53c0872117f571712d4b /g10/passphrase.c
parent* configure.ac: Include -ldl when card support is used. (diff)
downloadgnupg-441aeb85f21436b1ae2ecd1de420138016baba57.tar.gz
gnupg-441aeb85f21436b1ae2ecd1de420138016baba57.zip
* passphrase.c (ask_passphrase): Add optional promptid arg.
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.
Diffstat (limited to 'g10/passphrase.c')
-rw-r--r--g10/passphrase.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c
index 10dd3ff81..d3989bbe0 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -1007,7 +1007,9 @@ passphrase_clear_cache ( u32 *keyid, int algo )
* Ask for a passphrase and return that string.
*/
char *
-ask_passphrase (const char *description, const char *prompt, int *canceled)
+ask_passphrase (const char *description,
+ const char *promptid,
+ const char *prompt, int *canceled)
{
char *pw = NULL;
@@ -1042,7 +1044,7 @@ ask_passphrase (const char *description, const char *prompt, int *canceled)
pw = NULL;
}
else {
- pw = cpr_get_hidden("passphrase.ask",
+ pw = cpr_get_hidden(promptid? promptid : "passphrase.ask",
prompt?prompt : _("Enter passphrase: ") );
tty_kill_prompt();
}