aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-02-24 18:31:59 +0000
committerWerner Koch <[email protected]>2015-02-24 18:31:59 +0000
commite2d93402801a2cb822c723e891fd98233fdb3fd5 (patch)
tree4e22030025ce7239e11118a863f70ccbd03ac9ab /g10/gpg.c
parentgpg: Add function to extract the mailbox. (diff)
downloadgnupg-e2d93402801a2cb822c723e891fd98233fdb3fd5.tar.gz
gnupg-e2d93402801a2cb822c723e891fd98233fdb3fd5.zip
gpg: Add command --print-pka-records.
* g10/gpg.c (main): Add command --print-pka-records. * g10/options.h (struct opt): Add field "print_pka_records". * g10/keylist.c (list_keyblock_pka): New. (list_keyblock): Call it if new option is set. (print_fingerprint): Add mode 10. -- This is a fist step towards a slightly updated PKA implementation. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index df67d4f0d..ea331d634 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -131,6 +131,7 @@ enum cmd_and_opt_values
aSendKeys,
aRecvKeys,
aLocateKeys,
+ aPrintPKARecords,
aSearchKeys,
aRefreshKeys,
aFetchKeys,
@@ -407,6 +408,7 @@ 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" ,
@@ -2312,6 +2314,11 @@ 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:
@@ -3857,6 +3864,13 @@ 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 )