mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Fixed PASSWD --preset.
The previous patch required that the keygrip be cached before adding the new passphrase to the cache. No more.
This commit is contained in:
parent
f8c5395fbd
commit
b3c71eb26b
2 changed files with 11 additions and 7 deletions
|
@ -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--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue