From fa50aee3663b6f6dca61e330df59af6d8c035fe4 Mon Sep 17 00:00:00 2001 From: Suphanat Chunhapanya Date: Sat, 14 Apr 2018 04:04:31 +0700 Subject: hs-v3: Encrypt the descriptor using a cookie Previously, we encrypted the descriptor without the descriptor cookie. This commit, when the client auth is enabled, the descriptor cookie is always used. I also removed the code that is used to generate fake auth clients because it will not be used anymore. Signed-off-by: David Goulet --- src/test/test_hs_descriptor.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/test/test_hs_descriptor.c') diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c index 9191b74d9d..bc72b34c0e 100644 --- a/src/test/test_hs_descriptor.c +++ b/src/test/test_hs_descriptor.c @@ -300,7 +300,7 @@ test_encode_descriptor(void *arg) ret = ed25519_keypair_generate(&signing_kp, 0); tt_int_op(ret, OP_EQ, 0); desc = hs_helper_build_hs_desc_with_ip(&signing_kp); - ret = hs_desc_encode_descriptor(desc, &signing_kp, &encoded); + ret = hs_desc_encode_descriptor(desc, &signing_kp, NULL, &encoded); tt_int_op(ret, OP_EQ, 0); tt_assert(encoded); @@ -333,7 +333,7 @@ test_decode_descriptor(void *arg) ret = hs_desc_decode_descriptor("hladfjlkjadf", subcredential, &decoded); tt_int_op(ret, OP_EQ, -1); - ret = hs_desc_encode_descriptor(desc, &signing_kp, &encoded); + ret = hs_desc_encode_descriptor(desc, &signing_kp, NULL, &encoded); tt_int_op(ret, OP_EQ, 0); tt_assert(encoded); @@ -353,7 +353,8 @@ test_decode_descriptor(void *arg) desc_no_ip = hs_helper_build_hs_desc_no_ip(&signing_kp_no_ip); tt_assert(desc_no_ip); tor_free(encoded); - ret = hs_desc_encode_descriptor(desc_no_ip, &signing_kp_no_ip, &encoded); + ret = hs_desc_encode_descriptor(desc_no_ip, &signing_kp_no_ip, + NULL, &encoded); tt_int_op(ret, OP_EQ, 0); tt_assert(encoded); hs_descriptor_free(decoded); -- cgit v1.2.3-54-g00ecf