diff options
author | Werner Koch <[email protected]> | 2016-07-14 13:58:56 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-07-14 13:58:56 +0000 |
commit | be1e4560d5afb99a6a7b7c639cce980006530a9e (patch) | |
tree | 0ba98e2dbc56153cb5f6e1c50b2adc259965a40e /g10/gpg.c | |
parent | Merge branch 'master' into STABLE-BRANCH-2-2 (diff) | |
parent | po: Auto-update translations (diff) | |
download | gnupg-be1e4560d5afb99a6a7b7c639cce980006530a9e.tar.gz gnupg-be1e4560d5afb99a6a7b7c639cce980006530a9e.zip |
Merge branch 'master' into STABLE-BRANCH-2-2
Diffstat (limited to '')
-rw-r--r-- | g10/gpg.c | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -534,8 +534,8 @@ static ARGPARSE_OPTS opts[] = { ARGPARSE_s_n (oBZ2DecompressLowmem, "bzip2-decompress-lowmem", "@"), ARGPARSE_s_n (oMimemode, "mimemode", "@"), - ARGPARSE_s_n (oTextmode, "textmode", N_("use canonical text mode")), - ARGPARSE_s_n (oTextmode, "textmode", N_("use canonical text mode")), + ARGPARSE_s_n (oTextmodeShort, NULL, "@"), + ARGPARSE_s_n (oTextmode, "textmode", N_("use canonical text mode")), ARGPARSE_s_n (oNoTextmode, "no-textmode", "@"), ARGPARSE_s_n (oExpert, "expert", "@"), @@ -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; |