aboutsummaryrefslogtreecommitdiffstats
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
parentkbx: Fix schema of the fingerprint table. (diff)
downloadgnupg-f6237ccd313a42c7f3271e0f93c39d43fe16e9f3.tar.gz
gnupg-f6237ccd313a42c7f3271e0f93c39d43fe16e9f3.zip
gpg: New import option "force-update"HEADmaster
* 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.
-rw-r--r--g10/import.c6
-rw-r--r--g10/options.h1
2 files changed, 6 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
diff --git a/g10/options.h b/g10/options.h
index 962f45f16..8757b4b9a 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -440,6 +440,7 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode;
#define IMPORT_COLLAPSE_SUBKEYS (1<<16)
#define IMPORT_BULK (1<<17)
#define IMPORT_IGNORE_ATTRIBUTES (1<<18)
+#define IMPORT_FORCE_UPDATE (1<<19)
#define EXPORT_LOCAL_SIGS (1<<0)
#define EXPORT_ATTRIBUTES (1<<1)