diff options
author | Ben Kibbey <[email protected]> | 2011-04-10 13:37:18 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2011-04-12 16:00:59 +0000 |
commit | 944bf8f5b550bdbab292e7fadd0016b341c7bef9 (patch) | |
tree | 39f8e34e04f7bcb7cc4ea3c61e43c8af5e2a0fc1 /agent/command.c | |
parent | Added KEYINFO field to show the protection type of a key. This differs from t... (diff) | |
download | gnupg-944bf8f5b550bdbab292e7fadd0016b341c7bef9.tar.gz gnupg-944bf8f5b550bdbab292e7fadd0016b341c7bef9.zip |
Added GENKEY --preset to add the passphrase of the generated key to the cache.
Diffstat (limited to 'agent/command.c')
-rw-r--r-- | agent/command.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/agent/command.c b/agent/command.c index d53ca5e54..0121a20de 100644 --- a/agent/command.c +++ b/agent/command.c @@ -831,7 +831,7 @@ cmd_pkdecrypt (assuan_context_t ctx, char *line) static const char hlp_genkey[] = - "GENKEY [--no-protection] [<cache_nonce>]\n" + "GENKEY [--no-protection] [--preset] [<cache_nonce>]\n" "\n" "Generate a new key, store the secret part and return the public\n" "part. Here is an example transaction:\n" @@ -843,6 +843,9 @@ static const char hlp_genkey[] = " S: D (public-key\n" " S: D (rsa (n 326487324683264) (e 10001)))\n" " S: OK key created\n" + "\n" + "When the --preset option is used the passphrase for the generated\n" + "key will be added to the cache.\n" "\n"; static gpg_error_t cmd_genkey (assuan_context_t ctx, char *line) @@ -854,8 +857,10 @@ cmd_genkey (assuan_context_t ctx, char *line) size_t valuelen; membuf_t outbuf; char *cache_nonce = NULL; + int opt_preset; char *p; + opt_preset = has_option (line, "--preset"); no_protection = has_option (line, "--no-protection"); line = skip_options (line); @@ -874,7 +879,7 @@ cmd_genkey (assuan_context_t ctx, char *line) init_membuf (&outbuf, 512); rc = agent_genkey (ctrl, cache_nonce, (char*)value, valuelen, no_protection, - &outbuf); + opt_preset, &outbuf); xfree (value); if (rc) clear_outbuf (&outbuf); |