aboutsummaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2008-12-09 08:58:02 +0000
committerWerner Koch <[email protected]>2008-12-09 08:58:02 +0000
commit382d2f8efbb31b1eee16c1bbcd521099eb42c622 (patch)
tree514044051e08dcc8906d00ddc89a50053483a25b /agent
parentAlign ticker to the full or half second. (diff)
downloadgnupg-382d2f8efbb31b1eee16c1bbcd521099eb42c622.tar.gz
gnupg-382d2f8efbb31b1eee16c1bbcd521099eb42c622.zip
Minor fixes.
Diffstat (limited to 'agent')
-rw-r--r--agent/ChangeLog9
-rw-r--r--agent/command.c8
-rw-r--r--agent/gpg-agent.c2
-rw-r--r--agent/preset-passphrase.c3
-rw-r--r--agent/protect-tool.c3
5 files changed, 13 insertions, 12 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 65669d76a..a9e7be62b 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,12 @@
+2008-12-09 Werner Koch <[email protected]>
+
+ * gpg-agent.c (main): Call i18n_init before init_common_subsystems.
+ * preset-passphrase.c (main): Ditto.
+ * protect-tool.c (main): Ditto.
+
+ * command.c (cmd_preset_passphrase): Allow an arbitrary string for
+ the cache id.
+
2008-12-08 Werner Koch <[email protected]>
* gpg-agent.c (handle_connections): Sync the ticker to the next
diff --git a/agent/command.c b/agent/command.c
index e3e51f4dd..4f28d411b 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -1093,7 +1093,7 @@ cmd_passwd (assuan_context_t ctx, char *line)
return rc;
}
-/* PRESET_PASSPHRASE <hexstring_with_keygrip> <timeout> <hexstring>
+/* PRESET_PASSPHRASE <string_or_keygrip> <timeout> <hexstring>
Set the cached passphrase/PIN for the key identified by the keygrip
to passwd for the given time, where -1 means infinite and 0 means
@@ -1104,7 +1104,6 @@ static int
cmd_preset_passphrase (assuan_context_t ctx, char *line)
{
int rc;
- unsigned char grip[20];
char *grip_clear = NULL;
char *passphrase = NULL;
int ttl;
@@ -1113,11 +1112,6 @@ cmd_preset_passphrase (assuan_context_t ctx, char *line)
if (!opt.allow_preset_passphrase)
return set_error (GPG_ERR_NOT_SUPPORTED, "no --allow-preset-passphrase");
- rc = parse_keygrip (ctx, line, grip);
- if (rc)
- return rc;
-
- /* FIXME: parse_keygrip should return a tail pointer. */
grip_clear = line;
while (*line && (*line != ' ' && *line != '\t'))
line++;
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 8aae8a6a3..21e4c4345 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -535,9 +535,9 @@ main (int argc, char **argv )
log_set_prefix ("gpg-agent", JNLIB_LOG_WITH_PREFIX|JNLIB_LOG_WITH_PID);
/* Make sure that our subsystems are ready. */
+ i18n_init ();
init_common_subsystems ();
- i18n_init ();
/* Libgcrypt requires us to register the threading model first.
Note that this will also do the pth_init. */
diff --git a/agent/preset-passphrase.c b/agent/preset-passphrase.c
index cb906ad89..77646d87e 100644
--- a/agent/preset-passphrase.c
+++ b/agent/preset-passphrase.c
@@ -209,9 +209,8 @@ main (int argc, char **argv)
log_set_prefix ("gpg-preset-passphrase", 1);
/* Make sure that our subsystems are ready. */
- init_common_subsystems ();
-
i18n_init ();
+ init_common_subsystems ();
opt_homedir = default_homedir ();
diff --git a/agent/protect-tool.c b/agent/protect-tool.c
index 288dbe83b..ddf91e03d 100644
--- a/agent/protect-tool.c
+++ b/agent/protect-tool.c
@@ -1059,9 +1059,8 @@ main (int argc, char **argv )
log_set_prefix ("gpg-protect-tool", 1);
/* Make sure that our subsystems are ready. */
- init_common_subsystems ();
-
i18n_init ();
+ init_common_subsystems ();
if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )
{