diff options
author | Werner Koch <wk@gnupg.org> | 2014-06-03 21:35:59 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-06-03 21:35:59 +0200 |
commit | be07ed65e169a7ec3fbecdb1abf988fc0245d9ff (patch) | |
tree | 020a3cbfbe5db314cce07681591f14201a086b65 /sm/server.c | |
parent | artwork: Add 128x128 variant of the logo. (diff) | |
download | gnupg2-be07ed65e169a7ec3fbecdb1abf988fc0245d9ff.tar.xz gnupg2-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 '')
-rw-r--r-- | sm/server.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sm/server.c b/sm/server.c index 201a34b3e..f399c8ec1 100644 --- a/sm/server.c +++ b/sm/server.c @@ -274,6 +274,11 @@ option_handler (assuan_context_t ctx, const char *key, const char *value) int i = *value? atoi (value) : 0; ctrl->with_validation = i; } + else if (!strcmp (key, "with-validation")) + { + int i = *value? atoi (value) : 0; + ctrl->with_secret = i; + } else if (!strcmp (key, "validation-model")) { int i = gpgsm_parse_validation_model (value); |