aboutsummaryrefslogtreecommitdiff
path: root/src/or/hs_common.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-01-16 13:29:03 -0500
committerDavid Goulet <dgoulet@torproject.org>2017-07-13 16:49:08 -0400
commit765ed5dac160b28fb658560e8f39d1d7ab3d1c75 (patch)
tree6f101ed5f4b399c3c0c2faf5056c3ff600895fcf /src/or/hs_common.h
parent02e2edeb33224461d1fbb879722c0948171b9688 (diff)
downloadtor-765ed5dac160b28fb658560e8f39d1d7ab3d1c75.tar.gz
tor-765ed5dac160b28fb658560e8f39d1d7ab3d1c75.zip
prop224: Add a init/free_all function for the whole subsystem
Introduces hs_init() located in hs_common.c which initialize the entire HS v3 subsystem. This is done _prior_ to the options being loaded because we need to allocate global data structure before we load the configuration. The hs_free_all() is added to release everything from tor_free_all(). Note that both functions do NOT handle v2 service subsystem but does handle the common interface that both v2 and v3 needs such as the cache and circuitmap. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_common.h')
-rw-r--r--src/or/hs_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/hs_common.h b/src/or/hs_common.h
index abc44c09d1..8016535ca9 100644
--- a/src/or/hs_common.h
+++ b/src/or/hs_common.h
@@ -58,6 +58,9 @@ typedef enum {
HS_AUTH_KEY_TYPE_ED25519 = 2,
} hs_auth_key_type_t;
+void hs_init(void);
+void hs_free_all(void);
+
int hs_check_service_private_dir(const char *username, const char *path,
unsigned int dir_group_readable,
unsigned int create);