* import.c (import_one): Make sure that a newly imported key starts with a
authorDavid Shaw <dshaw@jabberwocky.com>
Tue, 1 Oct 2002 17:32:06 +0000 (17:32 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Tue, 1 Oct 2002 17:32:06 +0000 (17:32 +0000)
clean ownertrust.

g10/ChangeLog
g10/import.c

index c5e9e14..53e4c81 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-01  David Shaw  <dshaw@jabberwocky.com>
+
+       * import.c (import_one): Make sure that a newly imported key
+       starts with a clean ownertrust.
+
 2002-10-01  Werner Koch  <wk@gnupg.org>
 
        * getkey.c (get_pubkey_direct): New.
index 269bb93..f54f8d8 100644 (file)
@@ -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 */