aboutsummaryrefslogtreecommitdiffstats
path: root/g10/tofu.c
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2016-09-07 08:53:28 +0000
committerNeal H. Walfield <[email protected]>2016-09-07 08:53:28 +0000
commitee06b3f7889bd99c28ac68f4781bda77d67eed00 (patch)
treeae6037d94f3d9dda0a0f92f55938df7026a35dc7 /g10/tofu.c
parentg10: Change TOFU code to respect --faked-system-time. (diff)
downloadgnupg-ee06b3f7889bd99c28ac68f4781bda77d67eed00.tar.gz
gnupg-ee06b3f7889bd99c28ac68f4781bda77d67eed00.zip
g10: Check for a new binding a bit later.
* g10/tofu.c (build_conflict_set): Check for the current key after looking for conflicts and removing any '!'. -- Signed-off-by: Neal H. Walfield <[email protected]> Fixes-commit: 1f1f56e6
Diffstat (limited to '')
-rw-r--r--g10/tofu.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/g10/tofu.c b/g10/tofu.c
index 2976c6b18..5b202692c 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -1769,15 +1769,6 @@ build_conflict_set (tofu_dbs_t dbs, const char *fingerprint, const char *email)
return NULL;
}
- /* If the current binding has not yet been recorded, add it to the
- * list. (The order by above ensures that if it is present, it will
- * be first.) */
- if (! (conflict_set && strcmp (conflict_set->d, fingerprint) == 0))
- {
- add_to_strlist (&conflict_set, fingerprint);
- conflict_set->flags |= BINDING_NEW;
- }
-
/* Set BINDING_CONFLICT if the binding has a known conflict. This
* allows us to distinguish between bindings where the user
* explicitly set the policy to ask and bindings where we set the
@@ -1801,6 +1792,15 @@ build_conflict_set (tofu_dbs_t dbs, const char *fingerprint, const char *email)
}
}
+ /* If the current binding has not yet been recorded, add it to the
+ * list. (The order by above ensures that if it is present, it will
+ * be first.) */
+ if (! (conflict_set && strcmp (conflict_set->d, fingerprint) == 0))
+ {
+ add_to_strlist (&conflict_set, fingerprint);
+ conflict_set->flags |= BINDING_NEW;
+ }
+
conflict_set_count = strlist_length (conflict_set);
/* Eliminate false conflicts. */