mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-07 23:27:48 +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
|
@ -1,3 +1,7 @@
|
||||||
|
2011-04-12 Ben Kibbey <bjk@luxsci.net>
|
||||||
|
|
||||||
|
* command.c (cmd_passwd): Fixed --preset when not previously cached.
|
||||||
|
|
||||||
2011-04-12 Werner Koch <wk@g10code.com>
|
2011-04-12 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* agent.h (CACHE_TTL_NONCE, CACHE_TTL_OPT_PRESET): New.
|
* agent.h (CACHE_TTL_NONCE, CACHE_TTL_OPT_PRESET): New.
|
||||||
|
|
|
@ -1528,15 +1528,15 @@ cmd_passwd (assuan_context_t ctx, char *line)
|
||||||
ctrl->server_local->last_passwd_nonce = passwd_nonce;
|
ctrl->server_local->last_passwd_nonce = passwd_nonce;
|
||||||
passwd_nonce = NULL;
|
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);
|
xfree (newpass);
|
||||||
}
|
}
|
||||||
ctrl->in_passwd--;
|
ctrl->in_passwd--;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user