aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_shared_random.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2016-05-24 13:56:39 +0300
committerDavid Goulet <dgoulet@torproject.org>2016-07-01 14:01:41 -0400
commitf6f4668b1d0dec1a9afc25ef9d7fcd884cc55608 (patch)
treebba407b7797dd7ad4874dd38170e32787198d023 /src/test/test_shared_random.c
parent5fe9a50c310b8af4c9447475ec9e3748b24984f0 (diff)
downloadtor-f6f4668b1d0dec1a9afc25ef9d7fcd884cc55608.tar.gz
tor-f6f4668b1d0dec1a9afc25ef9d7fcd884cc55608.zip
prop250: Don't reject votes containing commits of unknown dirauths.
Instead just ignore those commits. Squash this commit with 33b2ade.
Diffstat (limited to 'src/test/test_shared_random.c')
-rw-r--r--src/test/test_shared_random.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c
index 18d45b5eba..dcd71e01aa 100644
--- a/src/test/test_shared_random.c
+++ b/src/test/test_shared_random.c
@@ -277,9 +277,6 @@ test_sr_commit(void *arg)
(void) arg;
- MOCK(trusteddirserver_get_by_v3_auth_digest,
- trusteddirserver_get_by_v3_auth_digest_m);
-
{ /* Setup a minimal dirauth environment for this test */
or_options_t *options = get_options_mutable();
@@ -366,7 +363,6 @@ test_sr_commit(void *arg)
done:
smartlist_free(args);
sr_commit_free(our_commit);
- UNMOCK(trusteddirserver_get_by_v3_auth_digest);
}
/* Test the encoding and decoding function for commit and reveal values. */
@@ -1121,6 +1117,9 @@ test_keep_commit(void *arg)
(void) arg;
+ MOCK(trusteddirserver_get_by_v3_auth_digest,
+ trusteddirserver_get_by_v3_auth_digest_m);
+
{ /* Setup a minimal dirauth environment for this test */
crypto_pk_t *k = crypto_pk_new();
/* Have a key that is not the one from our commit. */
@@ -1199,6 +1198,7 @@ test_keep_commit(void *arg)
done:
sr_commit_free(commit);
sr_commit_free(dup_commit);
+ UNMOCK(trusteddirserver_get_by_v3_auth_digest);
}
static void