From 9b12b45aa5e67d4d422bf75a3879df1d52dbe67f Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 13 Jun 2017 15:35:01 +0200 Subject: gpg: Check and fix keys on import. * doc/gpg.texi: Document the new import option. * g10/gpg.c (main): Make the new option default to yes. * g10/import.c (parse_import_options): Parse the new option. (import_one): Act on the new option. * g10/options.h (IMPORT_REPAIR_KEYS): New macro. GnuPG-bug-id: 2236 Signed-off-by: Justus Winter --- g10/gpg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'g10/gpg.c') diff --git a/g10/gpg.c b/g10/gpg.c index d777d1332..d12976941 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -2353,9 +2353,10 @@ main (int argc, char **argv) opt.max_cert_depth = 5; opt.escape_from = 1; opt.flags.require_cross_cert = 1; - opt.import_options = 0; + opt.import_options = IMPORT_REPAIR_KEYS; opt.export_options = EXPORT_ATTRIBUTES; - opt.keyserver_options.import_options = IMPORT_REPAIR_PKS_SUBKEY_BUG; + opt.keyserver_options.import_options = (IMPORT_REPAIR_KEYS + | IMPORT_REPAIR_PKS_SUBKEY_BUG); opt.keyserver_options.export_options = EXPORT_ATTRIBUTES; opt.keyserver_options.options = KEYSERVER_HONOR_PKA_RECORD; opt.verify_options = (LIST_SHOW_UID_VALIDITY -- cgit v1.2.3