1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpg: If there is a TOFU conflict, elide the too few message warning.

* g10/tofu.c (tofu_get_validity): If there was a conflict, don't also
print out a warning about too few messages.

Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
Neal H. Walfield 2017-02-02 13:26:17 +01:00
parent 027b81b35f
commit a08c781739

View File

@ -3694,6 +3694,7 @@ tofu_get_validity (ctrl_t ctrl, PKT_public_key *pk, strlist_t user_id_list,
int bindings = 0; int bindings = 0;
int bindings_valid = 0; int bindings_valid = 0;
int need_warning = 0; int need_warning = 0;
int had_conflict = 0;
dbs = opendbs (ctrl); dbs = opendbs (ctrl);
if (! dbs) if (! dbs)
@ -3762,6 +3763,7 @@ tofu_get_validity (ctrl_t ctrl, PKT_public_key *pk, strlist_t user_id_list,
* key. */ * key. */
log_assert (conflict_set); log_assert (conflict_set);
had_conflict = 1;
for (iter = conflict_set; iter; iter = iter->next) for (iter = conflict_set; iter; iter = iter->next)
show_statistics (dbs, iter->d, email, show_statistics (dbs, iter->d, email,
TOFU_POLICY_ASK, NULL, 1, now); TOFU_POLICY_ASK, NULL, 1, now);
@ -3794,7 +3796,7 @@ tofu_get_validity (ctrl_t ctrl, PKT_public_key *pk, strlist_t user_id_list,
xfree (email); xfree (email);
} }
if (need_warning) if (need_warning && ! had_conflict)
show_warning (fingerprint, user_id_list); show_warning (fingerprint, user_id_list);
die: die: