aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-06-13 13:35:01 +0000
committerJustus Winter <[email protected]>2017-06-14 07:36:28 +0000
commit9b12b45aa5e67d4d422bf75a3879df1d52dbe67f (patch)
treedb1933787e95085e1dd9457311106fe6f2d2a919 /g10/gpg.c
parentgpg: Refactor key checking and fixing. (diff)
downloadgnupg-9b12b45aa5e67d4d422bf75a3879df1d52dbe67f.tar.gz
gnupg-9b12b45aa5e67d4d422bf75a3879df1d52dbe67f.zip
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 <[email protected]>
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c5
1 files changed, 3 insertions, 2 deletions
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