diff options
author | David Goulet <dgoulet@torproject.org> | 2017-11-10 15:00:18 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-05 19:39:46 -0500 |
commit | 427b247c8d67baf2382755a3855f8ea380068107 (patch) | |
tree | bb6916997f44f40280600275620d1fcd9a68fd5c /src/or/hs_control.c | |
parent | c7050eaa16ca8c46c2cea81cc2f4d405ccf15968 (diff) | |
download | tor-427b247c8d67baf2382755a3855f8ea380068107.tar.gz tor-427b247c8d67baf2382755a3855f8ea380068107.zip |
hs-v3: Implement HS_DESC UPLOADED event
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_control.c')
-rw-r--r-- | src/or/hs_control.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/or/hs_control.c b/src/or/hs_control.c index 09dbbeba4b..fce6466ef1 100644 --- a/src/or/hs_control.c +++ b/src/or/hs_control.c @@ -154,3 +154,21 @@ hs_control_desc_event_upload(const char *onion_address, DIGEST256_LEN)); } +/* Send on the control port the "HS_DESC UPLOADED [...]" event. + * + * Using the directory connection identifier and the HSDir identity digest. + * None can be NULL. */ +void +hs_control_desc_event_uploaded(const hs_ident_dir_conn_t *ident, + const char *hsdir_id_digest) +{ + char onion_address[HS_SERVICE_ADDR_LEN_BASE32 + 1]; + + tor_assert(ident); + tor_assert(hsdir_id_digest); + + hs_build_address(&ident->identity_pk, HS_VERSION_THREE, onion_address); + + control_event_hs_descriptor_uploaded(hsdir_id_digest, onion_address); +} + |