aboutsummaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-01-08 19:18:49 +0000
committerWerner Koch <[email protected]>2010-01-08 19:18:49 +0000
commitbe45bf3d544873ff4bc86496c6ab6c5f16c6a26e (patch)
tree31c443f6d989917ea476143abc4fd5d2ae749faa /agent
parentFix bug 1146 (diff)
downloadgnupg-be45bf3d544873ff4bc86496c6ab6c5f16c6a26e.tar.gz
gnupg-be45bf3d544873ff4bc86496c6ab6c5f16c6a26e.zip
Add dummu option --passwd for gpg.
Collected changes.
Diffstat (limited to 'agent')
-rw-r--r--agent/ChangeLog4
-rw-r--r--agent/command.c8
-rw-r--r--agent/divert-scd.c2
-rw-r--r--agent/minip12.c2
4 files changed, 14 insertions, 2 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 600fd10b8..70ff89b48 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-21 Werner Koch <[email protected]>
+
+ * command.c (cmd_getinfo): Add sub-command s2k_count.
+
2009-12-14 Werner Koch <[email protected]>
* protect.c (agent_unprotect): Decode the S2K count here and take
diff --git a/agent/command.c b/agent/command.c
index deb5beb13..1e0c5e744 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -1637,6 +1637,7 @@ static const char hlp_getinfo[] =
" socket_name - Return the name of the socket.\n"
" ssh_socket_name - Return the name of the ssh socket.\n"
" scd_running - Return OK if the SCdaemon is already running.\n"
+ " s2k_count - Return the calibrated S2K count.\n"
" cmd_has_option\n"
" - Returns OK if the command CMD implements the option OPT.";
static gpg_error_t
@@ -1678,6 +1679,13 @@ cmd_getinfo (assuan_context_t ctx, char *line)
{
rc = agent_scd_check_running ()? 0 : gpg_error (GPG_ERR_GENERAL);
}
+ else if (!strcmp (line, "s2k_count"))
+ {
+ char numbuf[50];
+
+ snprintf (numbuf, sizeof numbuf, "%lu", get_standard_s2k_count ());
+ rc = assuan_send_data (ctx, numbuf, strlen (numbuf));
+ }
else if (!strncmp (line, "cmd_has_option", 14)
&& (line[14] == ' ' || line[14] == '\t' || !line[14]))
{
diff --git a/agent/divert-scd.c b/agent/divert-scd.c
index 6f23e98ca..bf07d0785 100644
--- a/agent/divert-scd.c
+++ b/agent/divert-scd.c
@@ -80,7 +80,7 @@ ask_for_card (ctrl_t ctrl, const unsigned char *shadow_info, char **r_kid)
}
else
{
- log_error ("error accesing card: %s\n", gpg_strerror (rc));
+ log_error ("error accessing card: %s\n", gpg_strerror (rc));
}
if (!rc)
diff --git a/agent/minip12.c b/agent/minip12.c
index 6b65c8c36..247171773 100644
--- a/agent/minip12.c
+++ b/agent/minip12.c
@@ -1698,7 +1698,7 @@ build_key_sequence (gcry_mpi_t *kparms, size_t *r_length)
}
if (i != 8)
{
- log_error ("invalid paramters for p12_build\n");
+ log_error ("invalid parameters for p12_build\n");
return NULL;
}
/* Now this all goes into a sequence. */