diff options
author | Werner Koch <[email protected]> | 2016-05-21 10:26:44 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-05-21 10:26:44 +0000 |
commit | 754b1c463034a634a678d8efc76c27fd46aad9b9 (patch) | |
tree | f83aa8b328058ebc57a016f0a854009f5cffc2cf /g10/trustdb.c | |
parent | gpg: Pass CTRL object down to the trust functions (diff) | |
download | gnupg-754b1c463034a634a678d8efc76c27fd46aad9b9.tar.gz gnupg-754b1c463034a634a678d8efc76c27fd46aad9b9.zip |
gpg: Store the Tofu meta handle for databases in CTRL.
* g10/gpg.h (struct tofu_dbs_s, tofu_dbs_t): New declarations.
(struct server_control_s): Add field tofu.dbs.
* g10/tofu.c (struct dbs): Rename to tofu_dbs_s. Replace all users by
by tofu_dbs_t.
(opendbs): Add arg CTRL. Cache the DBS in CTRL.
(closedbs): Rename to tofu_closedbs and make global. Add arg CTRL.
(tofu_register): Add arg CTRL. Change all callers. Do not call
closedbs.
(tofu_get_validity): Ditto.
(tofu_set_policy): Ditto.
(tofu_get_policy): Ditto.
(tofu_set_policy_by_keyid): Add arg CTRL.
* g10/gpg.c (gpg_deinit_default_ctrl): Call tofu_closedbs.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/trustdb.c')
-rw-r--r-- | g10/trustdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/trustdb.c b/g10/trustdb.c index e5f7121dd..527a23d2f 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -1065,12 +1065,12 @@ tdb_get_validity_core (ctrl_t ctrl, user_ids ++; if (sig) - tl = tofu_register (main_pk, user_id->name, + tl = tofu_register (ctrl, main_pk, user_id->name, sig->digest, sig->digest_len, sig->timestamp, "unknown", may_ask); else - tl = tofu_get_validity (main_pk, user_id->name, may_ask); + tl = tofu_get_validity (ctrl, main_pk, user_id->name, may_ask); if (tl == TRUST_EXPIRED) user_ids_expired ++; |