mirror of
git://git.gnupg.org/gnupg.git
synced 2024-05-31 22:18:03 +02:00
g10: Clean keyblock on initial commit.
* g10/import.c (import_one): If option import-clean is set, also clean on initial import, not only for merge. Signed-off-by: Marcus Brinkmann <mb@g10code.com> GnuPG-bug-id: 2401
This commit is contained in:
parent
d8a55da715
commit
609bbdf361
|
@ -1606,6 +1606,7 @@ import_one (ctrl_t ctrl,
|
||||||
else if (rc ) /* Insert this key. */
|
else if (rc ) /* Insert this key. */
|
||||||
{
|
{
|
||||||
KEYDB_HANDLE hd;
|
KEYDB_HANDLE hd;
|
||||||
|
int n_sigs_cleaned, n_uids_cleaned;
|
||||||
|
|
||||||
hd = keydb_new ();
|
hd = keydb_new ();
|
||||||
if (!hd)
|
if (!hd)
|
||||||
|
@ -1635,6 +1636,10 @@ import_one (ctrl_t ctrl,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((options & IMPORT_CLEAN))
|
||||||
|
clean_key (ctrl, keyblock, opt.verbose, (options&IMPORT_MINIMAL),
|
||||||
|
&n_uids_cleaned,&n_sigs_cleaned);
|
||||||
|
|
||||||
rc = keydb_insert_keyblock (hd, keyblock );
|
rc = keydb_insert_keyblock (hd, keyblock );
|
||||||
if (rc)
|
if (rc)
|
||||||
log_error (_("error writing keyring '%s': %s\n"),
|
log_error (_("error writing keyring '%s': %s\n"),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user