aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command.c
diff options
context:
space:
mode:
authorBen Kibbey <[email protected]>2011-04-13 00:02:05 +0000
committerWerner Koch <[email protected]>2011-04-13 12:15:21 +0000
commitb3c71eb26b4420bd79ce72b94ac773c6636c525a (patch)
tree6459898a7098196549635e0aa96b2bab184cc7d3 /agent/command.c
parentUse macros for the 120 and 900s cache TTLs. (diff)
downloadgnupg-b3c71eb26b4420bd79ce72b94ac773c6636c525a.tar.gz
gnupg-b3c71eb26b4420bd79ce72b94ac773c6636c525a.zip
Fixed PASSWD --preset.
The previous patch required that the keygrip be cached before adding the new passphrase to the cache. No more.
Diffstat (limited to '')
-rw-r--r--agent/command.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/agent/command.c b/agent/command.c
index e5243ed34..d2ed23a67 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -1528,15 +1528,15 @@ cmd_passwd (assuan_context_t ctx, char *line)
ctrl->server_local->last_passwd_nonce = passwd_nonce;
passwd_nonce = NULL;
}
- if (opt_preset)
- {
- char hexgrip[40+1];
- bin2hex(grip, 20, hexgrip);
- err = agent_put_cache (hexgrip, CACHE_MODE_ANY, newpass,
- CACHE_TTL_OPT_PRESET);
- }
}
}
+ if (opt_preset)
+ {
+ char hexgrip[40+1];
+ bin2hex(grip, 20, hexgrip);
+ err = agent_put_cache (hexgrip, CACHE_MODE_ANY, newpass,
+ CACHE_TTL_OPT_PRESET);
+ }
xfree (newpass);
}
ctrl->in_passwd--;