From e79f1f4b01fa03afc01318d1b88cc4a5ce62f246 Mon Sep 17 00:00:00 2001 From: Peter Marschall Date: Mon, 12 Oct 2015 12:37:40 +0200 Subject: [PATCH 1/4] OpenPGP: accept -E as option in openpgp-tool - make behaviour match the usage message by accepting '-E' as alternative short form of '--erase' --- src/tools/openpgp-tool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/openpgp-tool.c b/src/tools/openpgp-tool.c index 2991381e..08497ca7 100644 --- a/src/tools/openpgp-tool.c +++ b/src/tools/openpgp-tool.c @@ -248,7 +248,7 @@ static int decode_options(int argc, char **argv) { int c; - while ((c = getopt_long(argc, argv,"r:x:CUG:L:hwvVd:", options, (int *) 0)) != EOF) { + while ((c = getopt_long(argc, argv,"r:x:CUG:L:EhwvVd:", options, (int *) 0)) != EOF) { switch (c) { case 'r': opt_reader = optarg; From 392bc08d8613202a58a8c97069e8b0c1fef3bcae Mon Sep 17 00:00:00 2001 From: Peter Marschall Date: Mon, 12 Oct 2015 16:40:59 +0200 Subject: [PATCH 2/4] OpenPGP: fix pretty name for gender code 39 in openpgp-tool - use the same term that GnuPG uses --- src/tools/openpgp-tool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/openpgp-tool.c b/src/tools/openpgp-tool.c index 08497ca7..0ffaf6b5 100644 --- a/src/tools/openpgp-tool.c +++ b/src/tools/openpgp-tool.c @@ -209,7 +209,7 @@ static char *prettify_gender(char *str) case '0': return "unknown"; case '1': return "male"; case '2': return "female"; - case '9': return "not applicable"; + case '9': return "not announced"; } } return NULL; From 524ad56146f1fd07139924822971097c8f311eba Mon Sep 17 00:00:00 2001 From: Peter Marschall Date: Mon, 12 Oct 2015 21:07:58 +0200 Subject: [PATCH 3/4] OpenPGP: remove unnecessary semicolons in openpgp-tool - this is C, not a shell script --- src/tools/openpgp-tool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/openpgp-tool.c b/src/tools/openpgp-tool.c index 0ffaf6b5..08e3553b 100644 --- a/src/tools/openpgp-tool.c +++ b/src/tools/openpgp-tool.c @@ -277,11 +277,11 @@ static int decode_options(int argc, char **argv) break; case 'C': opt_cardinfo++; - actions++;; + actions++; break; case 'U': opt_userinfo++; - actions++;; + actions++; break; case 'G': opt_genkey++; From 7de373b3b947a8da1c7f22246ec0cb093f6a25cf Mon Sep 17 00:00:00 2001 From: Peter Marschall Date: Tue, 13 Oct 2015 13:04:19 +0200 Subject: [PATCH 4/4] OpenPGP: mark do_erase as an action in openpgp-tool - avoid the unintended output of user info when only erasing was requested --- src/tools/openpgp-tool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/openpgp-tool.c b/src/tools/openpgp-tool.c index 08e3553b..11c2e6d5 100644 --- a/src/tools/openpgp-tool.c +++ b/src/tools/openpgp-tool.c @@ -308,6 +308,7 @@ static int decode_options(int argc, char **argv) break; case 'E': opt_erase++; + actions++; break; case OPT_DELKEY: opt_delkey++;