From dde073764c2eb237919aa9e908fda1968c11a091 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 13 Aug 2019 09:26:46 -0400 Subject: test: Build DoS cell extension Signed-off-by: David Goulet --- src/feature/hs/hs_cell.c | 2 +- src/feature/hs/hs_cell.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/feature') 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) */ -- cgit v1.2.3-54-g00ecf