aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/import.c')
-rw-r--r--g10/import.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/g10/import.c b/g10/import.c
index 16e2b0b4b..6439fd0a9 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -100,16 +100,25 @@ parse_import_options(char *str,unsigned int *options,int noisy)
{
{"import-local-sigs",IMPORT_LOCAL_SIGS,NULL,
N_("import signatures that are marked as local-only")},
+
{"repair-pks-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL,
N_("repair damage from the pks keyserver during import")},
+
+ {"keep-ownertrust", IMPORT_KEEP_OWNERTTRUST, NULL,
+ N_("do not clear the ownertrust values during import")},
+
{"fast-import",IMPORT_FAST,NULL,
N_("do not update the trustdb after import")},
+
{"merge-only",IMPORT_MERGE_ONLY,NULL,
N_("only accept updates to existing keys")},
+
{"import-clean",IMPORT_CLEAN,NULL,
N_("remove unusable parts from key after import")},
+
{"import-minimal",IMPORT_MINIMAL|IMPORT_CLEAN,NULL,
N_("remove as much as possible from key after import")},
+
/* Aliases for backward compatibility */
{"allow-local-sigs",IMPORT_LOCAL_SIGS,NULL,NULL},
{"repair-hkp-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL,NULL},
@@ -989,12 +998,13 @@ import_one (ctrl_t ctrl,
if (rc)
log_error (_("error writing keyring '%s': %s\n"),
keydb_get_resource_name (hd), g10_errstr(rc));
- else
+ else if (!(opt.import_options & IMPORT_KEEP_OWNERTTRUST))
{
/* This should not be possible since we delete the
ownertrust when a key is deleted, but it can happen if
the keyring and trustdb are out of sync. It can also
- be made to happen with the trusted-key command. */
+ be made to happen with the trusted-key command and by
+ importing and locally exported key. */
clear_ownertrusts (pk);
if(non_self)