aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-08-22 09:47:39 +0000
committerWerner Koch <[email protected]>2002-08-22 09:47:39 +0000
commit26f4dbc64b151b2e8f7c545903726b88c4cf1e00 (patch)
tree057bd94b3508b465cdf3ffa9f1e8ee308ea7feec
parent* import.c (print_imported_summary): Cleaned up. Print new (diff)
downloadgnupg-26f4dbc64b151b2e8f7c545903726b88c4cf1e00.tar.gz
gnupg-26f4dbc64b151b2e8f7c545903726b88c4cf1e00.zip
* query.c (agent_askpin): Provide the default desc text dependingNEWPG-0-9-1
on the pininfo. Do the basic PIN verification only when min_digist is set.
Diffstat (limited to '')
-rw-r--r--agent/ChangeLog6
-rw-r--r--agent/gpg-agent.c2
-rw-r--r--agent/query.c11
3 files changed, 14 insertions, 5 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 0fbccc946..e645142b9 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,9 @@
+2002-08-22 Werner Koch <[email protected]>
+
+ * query.c (agent_askpin): Provide the default desc text depending
+ on the pininfo. Do the basic PIN verification only when
+ min_digist is set.
+
2002-08-21 Werner Koch <[email protected]>
* query.c (agent_askpin): Hack to show the right default prompt.
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 73569b8d6..a29737089 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -732,7 +732,7 @@ handle_signal (int signo)
cleanup ();
agent_exit (0);
}
- break;
+ break;
case SIGINT:
log_info ("SIGINT received - immediate shutdown\n");
diff --git a/agent/query.c b/agent/query.c
index 7780abb26..c461a55ce 100644
--- a/agent/query.c
+++ b/agent/query.c
@@ -236,15 +236,18 @@ agent_askpin (const char *desc_text, struct pin_entry_info_s *pininfo)
char line[ASSUAN_LINELENGTH];
struct entry_parm_s parm;
const char *errtext = NULL;
- int is_pin;
+ int is_pin = 0;
if (opt.batch)
return 0; /* fixme: we should return BAD PIN */
if (!pininfo || pininfo->max_length < 1)
return seterr (Invalid_Value);
- if (!desc_text)
- desc_text = _("Please enter you PIN, so that the secret key "
+ if (!desc_text && pininfo->min_digits)
+ desc_text = _("Please enter your PIN, so that the secret key "
+ "can be unlocked for this session");
+ else if (!desc_text)
+ desc_text = _("Please enter your passphrase, so that the secret key "
"can be unlocked for this session");
is_pin = desc_text && strstr (desc_text, "PIN");
@@ -292,7 +295,7 @@ agent_askpin (const char *desc_text, struct pin_entry_info_s *pininfo)
else if (rc)
return unlock_pinentry (map_assuan_err (rc));
- if (!errtext && is_pin)
+ if (!errtext && pininfo->min_digits)
{
/* do some basic checks on the entered PIN. */
if (!all_digitsp (pininfo->pin))