From be07ed65e169a7ec3fbecdb1abf988fc0245d9ff Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 3 Jun 2014 21:35:59 +0200 Subject: 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. --- sm/server.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sm/server.c') 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); -- cgit v1.2.3