aboutsummaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-08-13 09:26:46 -0400
committerGeorge Kadianakis <desnacked@riseup.net>2019-08-26 15:53:46 +0300
commitdde073764c2eb237919aa9e908fda1968c11a091 (patch)
tree2b5b906e470bee81ec016bc7189526d321e32f75 /src/feature
parentaee66c80bd9824650b26c4918fcfeed37ddb9b49 (diff)
downloadtor-dde073764c2eb237919aa9e908fda1968c11a091.tar.gz
tor-dde073764c2eb237919aa9e908fda1968c11a091.zip
test: Build DoS cell extension
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/hs/hs_cell.c2
-rw-r--r--src/feature/hs/hs_cell.h10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/feature/hs/hs_cell.c b/src/feature/hs/hs_cell.c
index a67af1e9ad..547dda3e16 100644
--- a/src/feature/hs/hs_cell.c
+++ b/src/feature/hs/hs_cell.c
@@ -554,7 +554,7 @@ build_establish_intro_dos_extension(const hs_service_config_t *service_config,
/* Allocate and build all the ESTABLISH_INTRO cell extension. The given
* extensions pointer is always set to a valid cell extension object. */
-static trn_cell_extension_t *
+STATIC trn_cell_extension_t *
build_establish_intro_extensions(const hs_service_config_t *service_config,
const hs_service_intro_point_t *ip)
{
diff --git a/src/feature/hs/hs_cell.h b/src/feature/hs/hs_cell.h
index 5fb416c2f4..864b6fda5f 100644
--- a/src/feature/hs/hs_cell.h
+++ b/src/feature/hs/hs_cell.h
@@ -106,5 +106,15 @@ int hs_cell_parse_rendezvous2(const uint8_t *payload, size_t payload_len,
/* Util API. */
void hs_cell_introduce1_data_clear(hs_cell_introduce1_data_t *data);
+#ifdef TOR_UNIT_TESTS
+
+#include "trunnel/hs/cell_common.h"
+
+STATIC trn_cell_extension_t *
+build_establish_intro_extensions(const hs_service_config_t *service_config,
+ const hs_service_intro_point_t *ip);
+
+#endif /* defined(TOR_UNIT_TESTS) */
+
#endif /* !defined(TOR_HS_CELL_H) */