aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-03-10 12:44:40 +0000
committerWerner Koch <[email protected]>2015-03-10 14:37:16 +0000
commit7b5b52f3268b093eebbac3f199fb69bf246d9cd1 (patch)
treed1deeb1d4382c3a5cae1e26f17cc770ef7d0e012 /g10/gpg.c
parentgpg: Add --list-gcrypt-config and "curve" item for --list-config. (diff)
downloadgnupg-7b5b52f3268b093eebbac3f199fb69bf246d9cd1.tar.gz
gnupg-7b5b52f3268b093eebbac3f199fb69bf246d9cd1.zip
gpg: Change --print-pka-records into an option.
* g10/gpg.c (aPrintPKARecords): Rename to oPrintPKARecords and do not use it as a command. * g10/keylist.c (list_keyblock): List PKA rceords also for secret keys. -- An option allows to use it more flexible. For example to select only secret keys. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--g10/gpg.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index deb3966b7..eb754099f 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -132,7 +132,6 @@ enum cmd_and_opt_values
aSendKeys,
aRecvKeys,
aLocateKeys,
- aPrintPKARecords,
aSearchKeys,
aRefreshKeys,
aFetchKeys,
@@ -383,6 +382,7 @@ enum cmd_and_opt_values
oAllowWeakDigestAlgos,
oFakedSystemTime,
oNoAutostart,
+ oPrintPKARecords,
oNoop
};
@@ -409,7 +409,6 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_c (aCheckKeys, "check-sigs",N_("list and check key signatures")),
ARGPARSE_c (oFingerprint, "fingerprint", N_("list keys and fingerprints")),
ARGPARSE_c (aListSecretKeys, "list-secret-keys", N_("list secret keys")),
- ARGPARSE_c (aPrintPKARecords, "print-pka-records", "@"),
ARGPARSE_c (aKeygen, "gen-key",
N_("generate a new key pair")),
ARGPARSE_c (aQuickKeygen, "quick-gen-key" ,
@@ -712,6 +711,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oFixedListMode, "fixed-list-mode", "@"),
ARGPARSE_s_n (oLegacyListMode, "legacy-list-mode", "@"),
ARGPARSE_s_n (oListOnly, "list-only", "@"),
+ ARGPARSE_s_n (oPrintPKARecords, "print-pka-records", "@"),
ARGPARSE_s_n (oIgnoreTimeConflict, "ignore-time-conflict", "@"),
ARGPARSE_s_n (oIgnoreValidFrom, "ignore-valid-from", "@"),
ARGPARSE_s_n (oIgnoreCrcError, "ignore-crc-error", "@"),
@@ -2329,11 +2329,6 @@ main (int argc, char **argv)
set_cmd (&cmd, pargs.r_opt);
break;
- case aPrintPKARecords:
- set_cmd (&cmd, pargs.r_opt);
- opt.print_pka_records = 1;
- break;
-
case aKeygen:
case aFullKeygen:
case aEditKey:
@@ -2974,6 +2969,7 @@ main (int argc, char **argv)
case oFastListMode: opt.fast_list_mode = 1; break;
case oFixedListMode: /* Dummy */ break;
case oLegacyListMode: opt.legacy_list_mode = 1; break;
+ case oPrintPKARecords: opt.print_pka_records = 1; break;
case oListOnly: opt.list_only=1; break;
case oIgnoreTimeConflict: opt.ignore_time_conflict = 1; break;
case oIgnoreValidFrom: opt.ignore_valid_from = 1; break;
@@ -3879,13 +3875,6 @@ main (int argc, char **argv)
public_key_list (ctrl, sl, 1);
free_strlist (sl);
break;
- case aPrintPKARecords:
- sl = NULL;
- for (; argc; argc--, argv++)
- add_to_strlist2( &sl, *argv, utf8_strings );
- public_key_list (ctrl, sl, 0);
- free_strlist (sl);
- break;
case aQuickKeygen:
if (argc != 1 )