summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-12 19:42:13 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-12 21:32:42 -0400
commit491b6de1684e519d1fec870a5b46a4bb540cbc13 (patch)
tree64042dd43d1e2cf119a5774987844da1ca668ea2
parent7a4f4c35fa6a9c44b4c4e736369c393764fdfe8a (diff)
downloadtor-491b6de1684e519d1fec870a5b46a4bb540cbc13.tar.gz
tor-491b6de1684e519d1fec870a5b46a4bb540cbc13.zip
Do not cast junk to an ed25519 key in test.
-rw-r--r--src/test/test_hs_service.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index b57bcac297..ca6af43ba7 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -425,7 +425,7 @@ test_service_intro_point(void *arg)
/* Test functions that uses a service intropoints map with that previously
* created object (non legacy). */
{
- uint8_t garbage[DIGEST256_LEN] = {0};
+ ed25519_public_key_t garbage = { {0} };
hs_service_intro_point_t *query;
service = hs_service_new(get_options());
@@ -436,8 +436,7 @@ test_service_intro_point(void *arg)
service_intro_point_add(service->desc_current->intro_points.map, ip);
query = service_intro_point_find(service, &ip->auth_key_kp.pubkey);
tt_mem_op(query, OP_EQ, ip, sizeof(hs_service_intro_point_t));
- query = service_intro_point_find(service,
- (const ed25519_public_key_t *) garbage);
+ query = service_intro_point_find(service, &garbage);
tt_ptr_op(query, OP_EQ, NULL);
/* While at it, can I find the descriptor with the intro point? */