summaryrefslogtreecommitdiff
path: root/src/test/test_hs_client.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-04-08 16:18:44 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2019-05-03 18:15:11 +0300
commitf5635989b06260710b282e75be7b731e2846f700 (patch)
tree62c67a6dfd0618a65470c1975d54a7c79217f9c5 /src/test/test_hs_client.c
parent18d61c0e6e71dace189384c8af7f4fec158969b3 (diff)
downloadtor-f5635989b06260710b282e75be7b731e2846f700.tar.gz
tor-f5635989b06260710b282e75be7b731e2846f700.zip
Hiding crypt_path_t: Create a constructor for crypt_path_t.
We are using an opaque pointer so the structure needs to be allocated on the heap. This means we now need a constructor for crypt_path_t. Also modify all places initializing a crypt_path_t to use the constructor.
Diffstat (limited to 'src/test/test_hs_client.c')
-rw-r--r--src/test/test_hs_client.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c
index 607be339a9..9e1d73a855 100644
--- a/src/test/test_hs_client.c
+++ b/src/test/test_hs_client.c
@@ -39,6 +39,7 @@
#include "feature/hs/hs_cache.h"
#include "core/or/circuitlist.h"
#include "core/or/circuitbuild.h"
+#include "core/or/crypt_path.h"
#include "core/mainloop/connection.h"
#include "core/or/connection_edge.h"
#include "feature/nodelist/networkstatus.h"
@@ -145,9 +146,7 @@ helper_get_circ_and_stream_for_test(origin_circuit_t **circ_out,
if (is_legacy) {
/* Legacy: Setup rend data and final cpath */
- or_circ->build_state->pending_final_cpath =
- tor_malloc_zero(sizeof(crypt_path_t));
- or_circ->build_state->pending_final_cpath->magic = CRYPT_PATH_MAGIC;
+ or_circ->build_state->pending_final_cpath = crypt_path_new();
or_circ->build_state->pending_final_cpath->rend_dh_handshake_state =
crypto_dh_new(DH_TYPE_REND);
tt_assert(