aboutsummaryrefslogtreecommitdiffstats
path: root/g10/test-stubs.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-03-31 18:03:52 +0000
committerWerner Koch <[email protected]>2017-03-31 18:07:20 +0000
commit8f2671d2cc022af2f564e296bdeb3bb2d2734ef4 (patch)
tree0a5dfac0bb36cf364e313b000967863e42783793 /g10/test-stubs.c
parentgpg: Consistent use of preprocessor conditionals. (diff)
downloadgnupg-8f2671d2cc022af2f564e296bdeb3bb2d2734ef4.tar.gz
gnupg-8f2671d2cc022af2f564e296bdeb3bb2d2734ef4.zip
gpg: Pass CTRL to many more functions.
-- For proper operations as a server we need to avoid global variables. Thus we need to pass the session state CTRL to most functions. Quite a lot of changes but fortunately straightforward to do. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/test-stubs.c')
-rw-r--r--g10/test-stubs.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/g10/test-stubs.c b/g10/test-stubs.c
index d541e0d86..e5fd3ae9a 100644
--- a/g10/test-stubs.c
+++ b/g10/test-stubs.c
@@ -66,10 +66,12 @@ check_signatures_trust (ctrl_t ctrl, PKT_signature *sig)
}
void
-read_trust_options(byte *trust_model, ulong *created, ulong *nextcheck,
- byte *marginals, byte *completes, byte *cert_depth,
- byte *min_cert_level)
+read_trust_options (ctrl_t ctrl,
+ byte *trust_model, ulong *created, ulong *nextcheck,
+ byte *marginals, byte *completes, byte *cert_depth,
+ byte *min_cert_level)
{
+ (void)ctrl;
(void)trust_model;
(void)created;
(void)nextcheck;
@@ -85,8 +87,9 @@ read_trust_options(byte *trust_model, ulong *created, ulong *nextcheck,
*/
int
-cache_disabled_value(PKT_public_key *pk)
+cache_disabled_value (ctrl_t ctrl, PKT_public_key *pk)
{
+ (void)ctrl;
(void)pk;
return 0;
}
@@ -138,16 +141,18 @@ uid_trust_string_fixed (ctrl_t ctrl, PKT_public_key *key, PKT_user_id *uid)
}
int
-get_ownertrust_info (PKT_public_key *pk, int no_create)
+get_ownertrust_info (ctrl_t ctrl, PKT_public_key *pk, int no_create)
{
+ (void)ctrl;
(void)pk;
(void)no_create;
return '?';
}
unsigned int
-get_ownertrust (PKT_public_key *pk)
+get_ownertrust (ctrl_t ctrl, PKT_public_key *pk)
{
+ (void)ctrl;
(void)pk;
return TRUST_UNKNOWN;
}