aboutsummaryrefslogtreecommitdiffstats
path: root/sm/gpgsm.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-06-03 19:35:59 +0000
committerWerner Koch <[email protected]>2014-06-03 19:35:59 +0000
commitbe07ed65e169a7ec3fbecdb1abf988fc0245d9ff (patch)
tree020a3cbfbe5db314cce07681591f14201a086b65 /sm/gpgsm.c
parentartwork: Add 128x128 variant of the logo. (diff)
downloadgnupg-be07ed65e169a7ec3fbecdb1abf988fc0245d9ff.tar.gz
gnupg-be07ed65e169a7ec3fbecdb1abf988fc0245d9ff.zip
Add new option --with-secret.
* g10/gpg.c: Add option --with-secret. * g10/options.h (struct opt): Add field with_secret. * g10/keylist.c (public_key_list): Pass opt.with_secret to list_all and list_one. (list_all, list_one): Add arg mark_secret. (list_keyblock_colon): Add arg has_secret. * sm/gpgsm.c: Add option --with-secret. * sm/server.c (option_handler): Add option "with-secret". * sm/gpgsm.h (server_control_s): Add field with_secret. * sm/keylist.c (list_cert_colon): Take care of with_secret. Also move the token string from the wrong field 14 to 15. -- This option is useful for key managers which need to know whether a key has a secret key. This change allows to collect this information in one pass.
Diffstat (limited to 'sm/gpgsm.c')
-rw-r--r--sm/gpgsm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index 01f33e3ae..c813336ae 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -148,6 +148,7 @@ enum cmd_and_opt_values {
oWithFingerprint,
oWithMD5Fingerprint,
oWithKeygrip,
+ oWithSecret,
oAnswerYes,
oAnswerNo,
oKeyring,
@@ -383,6 +384,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oSkipVerify, "skip-verify", "@"),
ARGPARSE_s_n (oWithFingerprint, "with-fingerprint", "@"),
ARGPARSE_s_n (oWithKeygrip, "with-keygrip", "@"),
+ ARGPARSE_s_n (oWithSecret, "with-secret", "@"),
ARGPARSE_s_s (oDisableCipherAlgo, "disable-cipher-algo", "@"),
ARGPARSE_s_s (oDisablePubkeyAlgo, "disable-pubkey-algo", "@"),
ARGPARSE_s_n (oIgnoreTimeConflict, "ignore-time-conflict", "@"),
@@ -1333,6 +1335,7 @@ main ( int argc, char **argv)
case oWithKeyData: opt.with_key_data=1; /* fall thru */
case oWithColons: ctrl.with_colons = 1; break;
+ case oWithSecret: ctrl.with_secret = 1; break;
case oWithValidation: ctrl.with_validation=1; break;
case oWithEphemeralKeys: ctrl.with_ephemeral_keys=1; break;