aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-07-20 15:27:48 +0000
committerWerner Koch <[email protected]>2017-07-20 16:13:40 +0000
commit165cdd8121bbf80bfe2da071539d3578630f198f (patch)
tree878fc9f6f81d5d86a31362fb044a159ae9afc274 /g10/gpg.c
parentcommon: New function print_utf9_string. (diff)
downloadgnupg-165cdd8121bbf80bfe2da071539d3578630f198f.tar.gz
gnupg-165cdd8121bbf80bfe2da071539d3578630f198f.zip
gpg: New option --with-key-origin.
* g10/getkey.c (parse_key_origin): Factor list out as ... (key_origin_list): new struct. (key_origin_string): New. * g10/gpg.c (oWithKeyOrigin): New const. (opts): New option --with-key-origin. (main): Implement option. * g10/options.h (struct opt): New flag with_key_origin. * g10/keylist.c (list_keyblock_print): Print key origin info. (list_keyblock_colon): Ditto.
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 5c60e1d1b..70b8011a5 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -201,6 +201,7 @@ enum cmd_and_opt_values
oWithWKDHash,
oWithColons,
oWithKeyData,
+ oWithKeyOrigin,
oWithTofuInfo,
oWithSigList,
oWithSigCheck,
@@ -785,6 +786,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oWithKeygrip, "with-keygrip", "@"),
ARGPARSE_s_n (oWithSecret, "with-secret", "@"),
ARGPARSE_s_n (oWithWKDHash, "with-wkd-hash", "@"),
+ ARGPARSE_s_n (oWithKeyOrigin, "with-key-origin", "@"),
ARGPARSE_s_s (oDisableCipherAlgo, "disable-cipher-algo", "@"),
ARGPARSE_s_s (oDisablePubkeyAlgo, "disable-pubkey-algo", "@"),
ARGPARSE_s_n (oAllowNonSelfsignedUID, "allow-non-selfsigned-uid", "@"),
@@ -2733,6 +2735,10 @@ main (int argc, char **argv)
opt.with_wkd_hash = 1;
break;
+ case oWithKeyOrigin:
+ opt.with_key_origin = 1;
+ break;
+
case oSecretKeyring:
/* Ignore this old option. */
break;