aboutsummaryrefslogtreecommitdiffstats
path: root/g10/call-agent.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-06-02 19:21:08 +0000
committerWerner Koch <[email protected]>2016-06-02 19:21:08 +0000
commit1b460f049e5c1c102d8b55ad28781688252c5a6b (patch)
tree8dce2a01f0bbf2cb800541b7cddc2d8a8e6bc1c3 /g10/call-agent.h
parentgpg: Extend the --quick-gen-key command. (diff)
downloadgnupg-1b460f049e5c1c102d8b55ad28781688252c5a6b.tar.gz
gnupg-1b460f049e5c1c102d8b55ad28781688252c5a6b.zip
gpg: Try to use the passphrase from the primary for --quick-addkey.
* agent/command.c (cmd_genkey): Add option --passwd-nonce. (cmd_passwd): Return a PASSWD_NONCE in verify mode. * g10/call-agent.c (agent_genkey): Add arg 'passwd_nonce_addr' and do not send a RESET if given. (agent_passwd): Add arg 'verify'. * g10/keygen.c (common_gen): Add optional arg 'passwd_nonce_addr'. (gen_elg, gen_dsa, gen_ecc, gen_rsa, do_create): Ditto. (generate_subkeypair): Use sepeare hexgrip var for the to be created for hexgrip feature. Verify primary key first. Make use of the passwd nonce. Allow for a static passphrase. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/call-agent.h')
-rw-r--r--g10/call-agent.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/g10/call-agent.h b/g10/call-agent.h
index 06a19d47b..4e83388d2 100644
--- a/g10/call-agent.h
+++ b/g10/call-agent.h
@@ -156,7 +156,8 @@ gpg_error_t agent_get_keyinfo (ctrl_t ctrl, const char *hexkeygrip,
char **r_serialno);
/* Generate a new key. */
-gpg_error_t agent_genkey (ctrl_t ctrl, char **cache_nonce_addr,
+gpg_error_t agent_genkey (ctrl_t ctrl,
+ char **cache_nonce_addr, char **passwd_nonce_addr,
const char *keyparms, int no_protection,
const char *passphrase,
gcry_sexp_t *r_pubkey);
@@ -200,6 +201,7 @@ gpg_error_t agent_delete_key (ctrl_t ctrl, const char *hexkeygrip,
/* Change the passphrase of a key. */
gpg_error_t agent_passwd (ctrl_t ctrl, const char *hexkeygrip, const char *desc,
+ int verify,
char **cache_nonce_addr, char **passwd_nonce_addr);
/* Get the version reported by gpg-agent. */
gpg_error_t agent_get_version (ctrl_t ctrl, char **r_version);