diff options
author | David Shaw <[email protected]> | 2005-11-02 05:22:01 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2005-11-02 05:22:01 +0000 |
commit | 19de04694e2bf67f9908d8257df255a5cc47a59e (patch) | |
tree | 5e575b1d7b6d1224be0c7266195dcd85893ad49f /g10/import.c | |
parent | * gpg.sgml: Document backsign, --require-backsigs, and (diff) | |
download | gnupg-19de04694e2bf67f9908d8257df255a5cc47a59e.tar.gz gnupg-19de04694e2bf67f9908d8257df255a5cc47a59e.zip |
* import.c (import_one): Do collapse_uids() before we do any cleaning
so keyserver mangled keys with doubled user IDs can be properly
cleaned - possibly sigs on the different user IDs cancel each other
out.
* import.c (parse_import_options), export.c (parse_export_options):
List "xxx-clean" before the longer options so we don't end up with a
partial match on the longer options.
* trustdb.c (clean_uids_from_key): Return proper number of cleaned
user IDs. Don't count user IDs as cleaned unless we actually delete
something.
Diffstat (limited to '')
-rw-r--r-- | g10/import.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/g10/import.c b/g10/import.c index 7eeccbad4..d8a7b2a61 100644 --- a/g10/import.c +++ b/g10/import.c @@ -101,12 +101,12 @@ parse_import_options(char *str,unsigned int *options,int noisy) N_("create a public key when importing a secret key")}, {"merge-only",IMPORT_MERGE_ONLY,NULL, N_("only accept updates to existing keys")}, + {"import-clean",IMPORT_CLEAN_SIGS|IMPORT_CLEAN_UIDS,NULL, + N_("all import-clean-* options from above")}, {"import-clean-sigs",IMPORT_CLEAN_SIGS,NULL, N_("remove unusable signatures after import")}, {"import-clean-uids",IMPORT_CLEAN_UIDS,NULL, N_("remove unusable user IDs after import")}, - {"import-clean",IMPORT_CLEAN_SIGS|IMPORT_CLEAN_UIDS,NULL, - N_("all import-clean-* options from above")}, /* Aliases for backward compatibility */ {"allow-local-sigs",IMPORT_LOCAL_SIGS,NULL,NULL}, {"repair-hkp-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL,NULL}, @@ -739,6 +739,8 @@ import_one( const char *fname, KBNODE keyblock, return 0; } + collapse_uids(&keyblock); + /* Clean the key that we're about to import, to cut down on things that we have to clean later. This has no practical impact on the end result, but does result in less logging which might @@ -808,8 +810,6 @@ import_one( const char *fname, KBNODE keyblock, if( opt.verbose > 1 ) log_info (_("writing to `%s'\n"), keydb_get_resource_name (hd) ); - collapse_uids(&keyblock); - rc = keydb_insert_keyblock (hd, keyblock ); if (rc) log_error (_("error writing keyring `%s': %s\n"), @@ -886,7 +886,6 @@ import_one( const char *fname, KBNODE keyblock, goto leave; } - collapse_uids( &keyblock ); /* and try to merge the block */ clear_kbnode_flags( keyblock_orig ); clear_kbnode_flags( keyblock ); |