diff options
author | Werner Koch <wk@gnupg.org> | 2019-11-07 15:07:25 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-11-07 15:07:25 +0100 |
commit | 6701a38f8e4a35ba715ad37743b8505bfd089541 (patch) | |
tree | 4f8689c09714a724792c09c5f77a1061cd3e6800 /g10 | |
parent | gpg: Add option --allow-weak-key-signatures. (diff) | |
download | gnupg2-6701a38f8e4a35ba715ad37743b8505bfd089541.tar.xz gnupg2-6701a38f8e4a35ba715ad37743b8505bfd089541.zip |
gpg: Fix a potential loss of key sigs during import with self-sigs-only.
* g10/import.c (import_one_real): Don't do the final clean in the
merge case.
--
This fixes a regression introduced with self-sigs-only.
GnuPG-bug-id: 4628
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10')
-rw-r--r-- | g10/import.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/import.c b/g10/import.c index 47014b948..911d0989c 100644 --- a/g10/import.c +++ b/g10/import.c @@ -2151,7 +2151,10 @@ import_one_real (ctrl_t ctrl, if (err) goto leave; - if ((options & IMPORT_CLEAN)) + /* Clean the final keyblock again if requested. we can't do + * this if only self-signatures are imported; see bug #4628. */ + if ((options & IMPORT_CLEAN) + && !(options & IMPORT_SELF_SIGS_ONLY)) { merge_keys_and_selfsig (ctrl, keyblock_orig); clean_all_uids (ctrl, keyblock_orig, opt.verbose, |