diff options
author | Neal H. Walfield <[email protected]> | 2015-08-24 14:14:09 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-08-24 14:14:38 +0000 |
commit | 348a6ebb63523305ce9f47d0f3e8a9086c338fed (patch) | |
tree | 62cbe9ac5cbe9105299f2d31d01fc2778104a13b /agent/agent.h | |
parent | sm: Support secret key export via the Assuan interface. (diff) | |
download | gnupg-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 '')
-rw-r--r-- | agent/agent.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/agent/agent.h b/agent/agent.h index 958e3be6c..a1b37943c 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -47,6 +47,11 @@ /* Maximum length of a digest. */ #define MAX_DIGEST_LEN 64 +/* The maximum length of a passphrase (in bytes). Note: this is + further contrained by the Assuan line length (and any other text on + the same line). However, the Assuan line length is 1k bytes so + this shouldn't be a problem in practice. */ +#define MAX_PASSPHRASE_LEN 255 /* A large struct name "opt" to keep global flags */ |