From 633c1fea5f0dc4cb270c22ee41c24e1ec0706204 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 25 Aug 2020 10:33:57 +0200 Subject: gpg: Collapse duplicate subkeys. * g10/options.h (IMPORT_COLLAPSE_UIDS): New. (IMPORT_COLLAPSE_SUBKEYS): New. * g10/gpg.c (main): Make them the default. * g10/import.c (parse_import_options): New import options "no-collapse-uids" and "no-collapse_subkeys". (collapse_subkeys): New. (import_one_real): Collapse subkeys and allow disabling the collapsing using the new options. (read_key_from_file_or_buffer): Always collapse subkeys. * g10/keyedit.c (fix_keyblock): Call collapse_subkeys. -- GnuPG-bug-id: 4421 Signed-off-by: Werner Koch --- g10/options.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'g10/options.h') diff --git a/g10/options.h b/g10/options.h index bf1bb8f50..b2bd543e6 100644 --- a/g10/options.h +++ b/g10/options.h @@ -369,6 +369,8 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode; #define IMPORT_DRY_RUN (1<<12) #define IMPORT_DROP_UIDS (1<<13) #define IMPORT_SELF_SIGS_ONLY (1<<14) +#define IMPORT_COLLAPSE_UIDS (1<<15) +#define IMPORT_COLLAPSE_SUBKEYS (1<<16) #define EXPORT_LOCAL_SIGS (1<<0) #define EXPORT_ATTRIBUTES (1<<1) -- cgit v1.2.3