diff options
author | David Shaw <[email protected]> | 2002-10-01 17:32:06 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2002-10-01 17:32:06 +0000 |
commit | 05691b1dce606f6e5cbd73efff9c6c59fa9db8db (patch) | |
tree | 112c79a1a7fe8a840ddd48eac67f7bd636f26ed8 /g10/import.c | |
parent | * getkey.c (get_pubkey_direct): New. (diff) | |
download | gnupg-05691b1dce606f6e5cbd73efff9c6c59fa9db8db.tar.gz gnupg-05691b1dce606f6e5cbd73efff9c6c59fa9db8db.zip |
* import.c (import_one): Make sure that a newly imported key starts with a
clean ownertrust.
Diffstat (limited to '')
-rw-r--r-- | g10/import.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/g10/import.c b/g10/import.c index 269bb93c0..f54f8d850 100644 --- a/g10/import.c +++ b/g10/import.c @@ -665,7 +665,15 @@ import_one( const char *fname, KBNODE keyblock, log_error (_("error writing keyring `%s': %s\n"), keydb_get_resource_name (hd), g10_errstr(rc)); else - revalidation_mark (); + { + /* This should not be possible since we delete the + ownertrust when a key is deleted, but it can happen if + the keyring and trustdb are out of sync. It can also + be made to happen with the trusted-key command. */ + + clear_ownertrust (pk); + revalidation_mark (); + } keydb_release (hd); /* we are ready */ |