diff options
author | Werner Koch <wk@gnupg.org> | 2016-05-21 12:26:44 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2016-05-21 12:26:44 +0200 |
commit | 754b1c463034a634a678d8efc76c27fd46aad9b9 (patch) | |
tree | f83aa8b328058ebc57a016f0a854009f5cffc2cf /g10/test-stubs.c | |
parent | gpg: Pass CTRL object down to the trust functions (diff) | |
download | gnupg2-754b1c463034a634a678d8efc76c27fd46aad9b9.tar.xz gnupg2-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 <wk@gnupg.org>
Diffstat (limited to 'g10/test-stubs.c')
-rw-r--r-- | g10/test-stubs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/test-stubs.c b/g10/test-stubs.c index 177f35acd..cfaa72c02 100644 --- a/g10/test-stubs.c +++ b/g10/test-stubs.c @@ -456,9 +456,10 @@ export_pubkey_buffer (ctrl_t ctrl, const char *keyspec, unsigned int options, } gpg_error_t -tofu_get_policy (PKT_public_key *pk, PKT_user_id *user_id, +tofu_get_policy (ctrl_t ctrl, PKT_public_key *pk, PKT_user_id *user_id, enum tofu_policy *policy) { + (void)ctrl; (void)pk; (void)user_id; (void)policy; |