summaryrefslogtreecommitdiff
path: root/src/or/hs_service.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-11-15 14:01:16 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-05 19:39:46 -0500
commite71c6199ddd9514f6f04c13f4393bfc28961b272 (patch)
treef36da2db6b3bb4305345b6e54e8cfc8ac04e6baf /src/or/hs_service.h
parent2c8e97db587df4c3145ab98dd9251290be7a3379 (diff)
downloadtor-e71c6199ddd9514f6f04c13f4393bfc28961b272.tar.gz
tor-e71c6199ddd9514f6f04c13f4393bfc28961b272.zip
hs-v3: Add a public function to upload a descriptor to an HSDir
This is groundwork for the HSPOST control port command that needs a way in the HS subsystem to upload a service descriptor to a specific HSDir. To do so, we add a public function that takes a series of parameters including a fully encoded descriptor and initiate a directory request to a specific routerstatut_t object. It is for now not used but should be, in future commit, by the HSPOST command. This commit has no behavior change, only refactoring. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_service.h')
-rw-r--r--src/or/hs_service.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/hs_service.h b/src/or/hs_service.h
index de04987c8b..678f24b0a2 100644
--- a/src/or/hs_service.h
+++ b/src/or/hs_service.h
@@ -279,6 +279,13 @@ hs_service_add_ephemeral(ed25519_secret_key_t *sk, smartlist_t *ports,
int max_streams_close_circuit, char **address_out);
int hs_service_del_ephemeral(const char *address);
+/* Used outside of the HS subsystem by the control port command HSPOST. */
+void hs_service_upload_desc_to_dir(const char *encoded_desc,
+ const uint8_t version,
+ const ed25519_public_key_t *identity_pk,
+ const ed25519_public_key_t *blinded_pk,
+ const routerstatus_t *hsdir_rs);
+
#ifdef HS_SERVICE_PRIVATE
#ifdef TOR_UNIT_TESTS