aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_dir_handle_get.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-05-03 10:17:37 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-04 08:37:41 -0400
commit112286338b61ed747572cfa67ac38e2052e7c807 (patch)
tree55fa2684d9ab3201011cb65da950687cf1db9974 /src/test/test_dir_handle_get.c
parent0418357ffd575ff4a3ec95937f596776c3b9ecec (diff)
downloadtor-112286338b61ed747572cfa67ac38e2052e7c807.tar.gz
tor-112286338b61ed747572cfa67ac38e2052e7c807.zip
Store the sha3 of a networkstatus as part of the networkstatus_t
Also store it in the cached_dir_t.
Diffstat (limited to 'src/test/test_dir_handle_get.c')
-rw-r--r--src/test/test_dir_handle_get.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index 6e963913d1..c98938b2db 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -1773,10 +1773,14 @@ status_vote_current_consensus_ns_test(char **header, char **body,
size_t *body_len)
{
common_digests_t digests;
+ uint8_t sha3[DIGEST256_LEN];
dir_connection_t *conn = NULL;
#define NETWORK_STATUS "some network status string"
+ memset(&digests, 0x60, sizeof(digests));
+ memset(sha3, 0x06, sizeof(sha3));
dirserv_set_cached_consensus_networkstatus(NETWORK_STATUS, "ns", &digests,
+ sha3,
time(NULL));
MOCK(connection_write_to_buf_impl_, connection_write_to_buf_mock);