summaryrefslogtreecommitdiff
path: root/src/or/hs_service.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-04-04 08:35:31 -0400
committerNick Mathewson <nickm@torproject.org>2017-04-04 09:41:14 -0400
commit751958434792122e9363b54e499a30b2d83b8536 (patch)
treeeb82f148dbe4617eb106bf39aaa882b9e3ae6be2 /src/or/hs_service.h
parent6ec322822051a53e61ce0b97a5c63c66ae11fae7 (diff)
downloadtor-751958434792122e9363b54e499a30b2d83b8536.tar.gz
tor-751958434792122e9363b54e499a30b2d83b8536.zip
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 <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_service.h')
-rw-r--r--src/or/hs_service.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/or/hs_service.h b/src/or/hs_service.h
index 994521fc50..5d2d8dc4bb 100644
--- a/src/or/hs_service.h
+++ b/src/or/hs_service.h
@@ -12,21 +12,16 @@
#include "or.h"
#include "hs/cell_establish_intro.h"
-#ifdef HS_SERVICE_PRIVATE
+/* These functions are only used by unit tests and we need to expose them else
+ * hs_service.o ends up with no symbols in libor.a which makes clang throw a
+ * warning at compile time. See #21825. */
-#ifdef TOR_UNIT_TESTS
-
-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);
-
-STATIC ssize_t
+ssize_t
get_establish_intro_payload(uint8_t *buf, size_t buf_len,
const hs_cell_establish_intro_t *cell);
-#endif /* TOR_UNIT_TESTS */
-
-#endif /* HS_SERVICE_PRIVATE */
-
#endif /* TOR_HS_SERVICE_H */