aboutsummaryrefslogtreecommitdiffstats
path: root/g10/trustdb.c
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.c
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.c')
-rw-r--r--g10/trustdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/g10/trustdb.c b/g10/trustdb.c
index edae6ef45..51a8f2217 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -324,6 +324,13 @@ tdb_keyid_is_utk (u32 *kid)
return 0;
}
+
+/* Return the list of ultimately trusted keys. */
+struct key_item *
+tdb_utks (void)
+{
+ return utk_list;
+}
/*********************************************
*********** TrustDB stuff *******************