diff options
author | Ben Kibbey <[email protected]> | 2011-04-13 00:02:05 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2011-04-13 12:15:21 +0000 |
commit | b3c71eb26b4420bd79ce72b94ac773c6636c525a (patch) | |
tree | 6459898a7098196549635e0aa96b2bab184cc7d3 | |
parent | Use macros for the 120 and 900s cache TTLs. (diff) | |
download | gnupg-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/ChangeLog | 4 | ||||
-rw-r--r-- | agent/command.c | 14 |
2 files changed, 11 insertions, 7 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog index 21cd0c4ff..cd781e257 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,3 +1,7 @@ +2011-04-12 Ben Kibbey <[email protected]> + + * command.c (cmd_passwd): Fixed --preset when not previously cached. + 2011-04-12 Werner Koch <[email protected]> * agent.h (CACHE_TTL_NONCE, CACHE_TTL_OPT_PRESET): New. 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--; |