aboutsummaryrefslogtreecommitdiffstats
path: root/g10/trustdb.h
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2016-11-22 14:05:59 +0000
committerNeal H. Walfield <[email protected]>2016-11-22 14:24:05 +0000
commit44c17bcb003a3330f595a6ab144e8439b7b630cb (patch)
treeb64a6ba54422757471166b2a54f0aa773412681d /g10/trustdb.h
parentscd: Fix receive buffer size. (diff)
downloadgnupg-44c17bcb003a3330f595a6ab144e8439b7b630cb.tar.gz
gnupg-44c17bcb003a3330f595a6ab144e8439b7b630cb.zip
g10: If the set of UTKs changes, invalidate any changed policies.
* g10/trustdb.c (tdb_utks): New function. * g10/tofu.c (check_utks): New function. (initdb): Call it. * tests/openpgp/tofu.scm: Modify test to check the effective policy of keys whose effective policy changes when we change the set of UTKs. -- Signed-off-by: Neal H. Walfield <[email protected]> If the set of ultimately trusted keys changes, then it is possible that a binding's effective policy changes. To deal with this, we detect when the set of ultimately trusted keys changes and invalidate all cached policies.
Diffstat (limited to 'g10/trustdb.h')
-rw-r--r--g10/trustdb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/g10/trustdb.h b/g10/trustdb.h
index 77aa79da6..45ecc56ab 100644
--- a/g10/trustdb.h
+++ b/g10/trustdb.h
@@ -117,6 +117,9 @@ void tdb_register_trusted_keyid (u32 *keyid);
void tdb_register_trusted_key (const char *string);
/* Returns whether KID is on the list of ultimately trusted keys. */
int tdb_keyid_is_utk (u32 *kid);
+/* Return the list of ultimately trusted keys. The caller must not
+ * modify this list nor must it free the list. */
+struct key_item *tdb_utks (void);
void check_trustdb (ctrl_t ctrl);
void update_trustdb (ctrl_t ctrl);
int setup_trustdb( int level, const char *dbname );