aboutsummaryrefslogtreecommitdiffstats
path: root/g10/trustdb.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-05-02 17:10:59 +0000
committerWerner Koch <[email protected]>2016-05-02 17:10:59 +0000
commitae1889320b822d48f7118a29391605e9ac992701 (patch)
tree7b9eb9593da3ba38ba323c2c6310bc2fa5843007 /g10/trustdb.h
parentgpg: Improve line wrapping for a tofu message. (diff)
downloadgnupg-ae1889320b822d48f7118a29391605e9ac992701.tar.gz
gnupg-ae1889320b822d48f7118a29391605e9ac992701.zip
gpg: Extend TRUST_foo status lines with the trust model.
* g10/trustdb.h (TRUST_FLAG_TOFU_BASED): New. * g10/trustdb.c (trust_model_string): Lowercase the strings. Add arg "model" and change callers to call with OPT.TRUST_MODEL. * g10/tofu.c (tofu_wot_trust_combine): Set TRUST_FLAG_TOFU_BASED. * g10/pkclist.c (write_trust_status): New. (check_signatures_trust): Call new function. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/trustdb.h')
-rw-r--r--g10/trustdb.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/g10/trustdb.h b/g10/trustdb.h
index 718f7791c..7e1307d5c 100644
--- a/g10/trustdb.h
+++ b/g10/trustdb.h
@@ -21,7 +21,7 @@
#ifndef G10_TRUSTDB_H
#define G10_TRUSTDB_H
-/* Trust values must be sorted in ascending order */
+/* Trust values must be sorted in ascending order! */
#define TRUST_MASK 15
#define TRUST_UNKNOWN 0 /* o: not yet calculated/assigned */
#define TRUST_EXPIRED 1 /* e: calculation may be invalid */
@@ -30,11 +30,13 @@
#define TRUST_MARGINAL 4 /* m: marginally trusted */
#define TRUST_FULLY 5 /* f: fully trusted */
#define TRUST_ULTIMATE 6 /* u: ultimately trusted */
-/* trust values not covered by the mask */
-#define TRUST_FLAG_REVOKED 32 /* r: revoked */
-#define TRUST_FLAG_SUB_REVOKED 64 /* r: revoked but for subkeys */
-#define TRUST_FLAG_DISABLED 128 /* d: key/uid disabled */
+/* Trust values not covered by the mask. */
+#define TRUST_FLAG_REVOKED 32 /* r: revoked */
+#define TRUST_FLAG_SUB_REVOKED 64 /* r: revoked but for subkeys */
+#define TRUST_FLAG_DISABLED 128 /* d: key/uid disabled */
#define TRUST_FLAG_PENDING_CHECK 256 /* a check-trustdb is pending */
+#define TRUST_FLAG_TOFU_BASED 512 /* The trust value is based on
+ * the TOFU information. */
/* Private value used in tofu.c - must be different from the trust
values. */
@@ -117,6 +119,7 @@ void check_trustdb (void);
void update_trustdb (void);
int setup_trustdb( int level, const char *dbname );
void how_to_fix_the_trustdb (void);
+const char *trust_model_string (int model);
void init_trustdb( void );
void tdb_check_trustdb_stale (void);
void sync_trustdb( void );