aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-11-18 16:32:38 +0000
committerWerner Koch <[email protected]>2025-11-18 16:32:38 +0000
commitf6237ccd313a42c7f3271e0f93c39d43fe16e9f3 (patch)
tree75d988936ae21b4f1e0df32ccf4eeed19b9ffcba /g10/import.c
parentkbx: Fix schema of the fingerprint table. (diff)
downloadgnupg-f6237ccd313a42c7f3271e0f93c39d43fe16e9f3.tar.gz
gnupg-f6237ccd313a42c7f3271e0f93c39d43fe16e9f3.zip
gpg: New import option "force-update"
* g10/options.h (IMPORT_FORCE_UPDATE): New. * g10/import.c (parse_import_options): Add "force_update". (import_one_real): Use force_update. -- GnuPG-bug-id: 7892 Although the new database schema v2 handles ADSK and non-unique subkeys correctly, the fingerprints of all those keys are not automatically updated and can thus not been found using the fingerprint. This can however easily be fixed by exporting all keys and do an import of these keys using --import-options=force-update.
Diffstat (limited to 'g10/import.c')
-rw-r--r--g10/import.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/g10/import.c b/g10/import.c
index 9affe057c..1f1a045d4 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -209,6 +209,9 @@ parse_import_options(char *str,unsigned int *options,int noisy)
{"repair-keys", IMPORT_REPAIR_KEYS, NULL,
N_("repair keys on import")},
+ {"force-update", IMPORT_FORCE_UPDATE, NULL,
+ N_("update even unchanged keys")},
+
/* New options. Right now, without description string. */
{"ignore-attributes", IMPORT_IGNORE_ATTRIBUTES, NULL, NULL},
@@ -2364,7 +2367,8 @@ import_one_real (ctrl_t ctrl,
NULL, NULL);
}
- if (n_uids || n_sigs || n_subk || n_sigs_cleaned || n_uids_cleaned)
+ if (n_uids || n_sigs || n_subk || n_sigs_cleaned || n_uids_cleaned
+ || (options & IMPORT_FORCE_UPDATE))
{
/* Unless we are in restore mode apply meta data to the
* keyblock. Note that this will never change the first packet