aboutsummaryrefslogtreecommitdiffstats
path: root/g10/tofu.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/tofu.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/g10/tofu.c b/g10/tofu.c
index e1639284b..ed8bbbe1d 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -2795,17 +2795,30 @@ tofu_wot_trust_combine (int tofu_base, int wot_base)
/* Now we only have positive or neutral trust policies. We take
the max. */
- if (tofu == TRUST_ULTIMATE || wot == TRUST_ULTIMATE)
+ if (tofu == TRUST_ULTIMATE)
+ return upper | TRUST_ULTIMATE | TRUST_FLAG_TOFU_BASED;
+ if (wot == TRUST_ULTIMATE)
return upper | TRUST_ULTIMATE;
- if (tofu == TRUST_FULLY || wot == TRUST_FULLY)
+
+ if (tofu == TRUST_FULLY)
+ return upper | TRUST_FULLY | TRUST_FLAG_TOFU_BASED;
+ if (wot == TRUST_FULLY)
return upper | TRUST_FULLY;
- if (tofu == TRUST_MARGINAL || wot == TRUST_MARGINAL)
+
+ if (tofu == TRUST_MARGINAL)
+ return upper | TRUST_MARGINAL | TRUST_FLAG_TOFU_BASED;
+ if (wot == TRUST_MARGINAL)
return upper | TRUST_MARGINAL;
- if (tofu == TRUST_UNDEFINED || wot == TRUST_UNDEFINED)
+
+ if (tofu == TRUST_UNDEFINED)
+ return upper | TRUST_UNDEFINED | TRUST_FLAG_TOFU_BASED;
+ if (wot == TRUST_UNDEFINED)
return upper | TRUST_UNDEFINED;
+
return upper | TRUST_UNKNOWN;
}
+
/* Return the validity (TRUST_NEVER, etc.) of the binding
<FINGERPRINT, USER_ID>.