mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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.
This commit is contained in:
parent
d89dc6917e
commit
be07ed65e1
14 changed files with 88 additions and 30 deletions
|
@ -176,6 +176,7 @@ enum cmd_and_opt_values
|
|||
oFingerprint,
|
||||
oWithFingerprint,
|
||||
oWithKeygrip,
|
||||
oWithSecret,
|
||||
oAnswerYes,
|
||||
oAnswerNo,
|
||||
oKeyring,
|
||||
|
@ -705,6 +706,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||
ARGPARSE_s_n (oNoUtf8Strings, "no-utf8-strings", "@"),
|
||||
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 (oAllowNonSelfsignedUID, "allow-non-selfsigned-uid", "@"),
|
||||
|
@ -2386,6 +2388,10 @@ main (int argc, char **argv)
|
|||
opt.with_keygrip = 1;
|
||||
break;
|
||||
|
||||
case oWithSecret:
|
||||
opt.with_secret = 1;
|
||||
break;
|
||||
|
||||
case oSecretKeyring:
|
||||
/* Ignore this old option. */
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue