aboutsummaryrefslogtreecommitdiffstats
path: root/agent/findkey.c
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2015-08-24 14:14:09 +0000
committerNeal H. Walfield <[email protected]>2015-08-24 14:14:38 +0000
commit348a6ebb63523305ce9f47d0f3e8a9086c338fed (patch)
tree62cbe9ac5cbe9105299f2d31d01fc2778104a13b /agent/findkey.c
parentsm: Support secret key export via the Assuan interface. (diff)
downloadgnupg-348a6ebb63523305ce9f47d0f3e8a9086c338fed.tar.gz
gnupg-348a6ebb63523305ce9f47d0f3e8a9086c338fed.zip
agent: Raise the maximum password length. Don't hard code it.
* agent/agent.h (MAX_PASSPHRASE_LEN): Define. * agent/command-ssh.c (ssh_identity_register): Use it instead of a hard-coded literal. * agent/cvt-openpgp.c (convert_from_openpgp_main): Likewise. * agent/findkey.c (unprotect): Likewise. * agent/genkey.c (agent_ask_new_passphrase): Likewise. -- Signed-off-by: Neal H. Walfield <[email protected]>. GnuPG-bug-id: 2038
Diffstat (limited to 'agent/findkey.c')
-rw-r--r--agent/findkey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/agent/findkey.c b/agent/findkey.c
index e7cd79e6c..c49c37a55 100644
--- a/agent/findkey.c
+++ b/agent/findkey.c
@@ -450,10 +450,10 @@ unprotect (ctrl_t ctrl, const char *cache_nonce, const char *desc_text,
}
}
- pi = gcry_calloc_secure (1, sizeof (*pi) + 100);
+ pi = gcry_calloc_secure (1, sizeof (*pi) + MAX_PASSPHRASE_LEN + 1);
if (!pi)
return gpg_error_from_syserror ();
- pi->max_length = 100;
+ pi->max_length = MAX_PASSPHRASE_LEN + 1;
pi->min_digits = 0; /* we want a real passphrase */
pi->max_digits = 16;
pi->max_tries = 3;