From 751958434792122e9363b54e499a30b2d83b8536 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 4 Apr 2017 08:35:31 -0400 Subject: hs: Expose hs_service.c functions for unit tests In order to avoid src/or/hs_service.o to contain no symbols and thus making clang throw a warning, the functions are now exposed not just to unit tests. Signed-off-by: David Goulet --- src/or/hs_service.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/or/hs_service.c') diff --git a/src/or/hs_service.c b/src/or/hs_service.c index 7b12b63065..8687403b86 100644 --- a/src/or/hs_service.c +++ b/src/or/hs_service.c @@ -6,8 +6,6 @@ * \brief Implement next generation hidden service functionality **/ -#define HS_SERVICE_PRIVATE - #include "or.h" #include "relay.h" #include "rendservice.h" @@ -22,14 +20,12 @@ /* XXX We don't currently use these functions, apart from generating unittest data. When we start implementing the service-side support for prop224 we - should revisit these functions and use them. For now we mark them as - unittest-only code: */ -#ifdef TOR_UNIT_TESTS + should revisit these functions and use them. */ /** Given an ESTABLISH_INTRO cell, encode it and place its payload in * buf_out which has size buf_out_len. Return the number of * bytes written, or a negative integer if there was an error. */ -STATIC ssize_t +ssize_t get_establish_intro_payload(uint8_t *buf_out, size_t buf_out_len, const hs_cell_establish_intro_t *cell) { @@ -59,7 +55,7 @@ set_cell_extensions(hs_cell_establish_intro_t *cell) * return an ESTABLISH_INTRO cell. Return NULL if something went wrong. The * returned cell is allocated on the heap and it's the responsibility of the * caller to free it. */ -STATIC hs_cell_establish_intro_t * +hs_cell_establish_intro_t * generate_establish_intro_cell(const uint8_t *circuit_key_material, size_t circuit_key_material_len) { @@ -174,5 +170,3 @@ generate_establish_intro_cell(const uint8_t *circuit_key_material, return NULL; } -#endif /* TOR_UNIT_TESTS */ - -- cgit v1.2.3-54-g00ecf