1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Obscure the cached passphrases.

This commit is contained in:
Werner Koch 2010-09-02 10:46:23 +00:00
parent a0b9ebfb7d
commit 90a4599c5e
10 changed files with 215 additions and 160 deletions

View file

@ -1069,12 +1069,11 @@ cmd_get_passphrase (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
int rc;
const char *pw;
char *pw;
char *response;
char *cacheid = NULL, *desc = NULL, *prompt = NULL, *errtext = NULL;
const char *desc2 = _("Please re-enter this passphrase");
char *p;
void *cache_marker;
int opt_data, opt_check, opt_no_ask, opt_qualbar;
int opt_repeat = 0;
char *repeat_errtext = NULL;
@ -1135,12 +1134,11 @@ cmd_get_passphrase (assuan_context_t ctx, char *line)
if (!strcmp (desc, "X"))
desc = NULL;
pw = cacheid ? agent_get_cache (cacheid, CACHE_MODE_NORMAL, &cache_marker)
: NULL;
pw = cacheid ? agent_get_cache (cacheid, CACHE_MODE_NORMAL) : NULL;
if (pw)
{
rc = send_back_passphrase (ctx, opt_data, pw);
agent_unlock_cache_entry (&cache_marker);
xfree (pw);
}
else if (opt_no_ask)
rc = gpg_error (GPG_ERR_NO_DATA);