aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-07-14 13:19:36 +0000
committerWerner Koch <[email protected]>2016-07-14 13:19:36 +0000
commit1e9bc66a9a60de668890452d504eea3c3c614f7e (patch)
tree4b766609e6ec76b677cae137621dc26831131d4d /g10/gpg.c
parentpo: Complete update of the Norwegian translation (diff)
downloadgnupg-1e9bc66a9a60de668890452d504eea3c3c614f7e.tar.gz
gnupg-1e9bc66a9a60de668890452d504eea3c3c614f7e.zip
gpg: Remove options --print-dane-records and --print-pka-records.
* g10/gpg.c (main): Remove options but print a dedicated warning. * g10/options.h (struct opt): Remove fields 'print_dane_records' and 'print_pka_records'. * g10/keylist.c (list_keyblock): Do not call list_keyblock_pka. (list_keyblock_pka): Remove. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--g10/gpg.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 539bda539..35d350eb6 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -2173,15 +2173,19 @@ main (int argc, char **argv)
int pwfd = -1;
int fpr_maybe_cmd = 0; /* --fingerprint maybe a command. */
int any_explicit_recipient = 0;
- int require_secmem=0,got_secmem=0;
+ int require_secmem = 0;
+ int got_secmem = 0;
struct assuan_malloc_hooks malloc_hooks;
ctrl_t ctrl;
+ static int print_dane_records;
+ static int print_pka_records;
+
+
#ifdef __riscos__
opt.lock_once = 1;
#endif /* __riscos__ */
-
/* Please note that we may running SUID(ROOT), so be very CAREFUL
when adding any stuff between here and the call to
secmem_init() somewhere after the option parsing. */
@@ -3186,8 +3190,8 @@ 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 oPrintDANERecords: opt.print_dane_records = 1; break;
+ case oPrintPKARecords: print_pka_records = 1; break;
+ case oPrintDANERecords: print_dane_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;
@@ -3410,6 +3414,18 @@ main (int argc, char **argv)
xfree (save_configname);
xfree (default_configname);
+ if (print_dane_records)
+ log_error ("invalid option \"%s\"; use \"%s\" instead\n",
+ "--print-dane-records",
+ "--export-options export-dane");
+ if (print_pka_records)
+ log_error ("invalid option \"%s\"; use \"%s\" instead\n",
+ "--print-pks-records",
+ "--export-options export-pka");
+ if (log_get_errorcount (0))
+ g10_exit(2);
+
+
if( nogreeting )
greeting = 0;