summaryrefslogtreecommitdiff
path: root/src/or/hs_client.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-11-10 12:07:57 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-05 19:39:46 -0500
commit743d0b9d91c0c26045aa9a725865870f0c052794 (patch)
tree70988e5bea61695a53546e55eb73085e734b4726 /src/or/hs_client.c
parente7d606900e635719ed0cb5b76343a69ef4a1e43b (diff)
downloadtor-743d0b9d91c0c26045aa9a725865870f0c052794.tar.gz
tor-743d0b9d91c0c26045aa9a725865870f0c052794.zip
hs-v3: Implement HS_DESC REQUESTED event
This changes the control_event_hs_descriptor_requested() call to add the hsdir index optional value. v2 passes NULL all the time. This commit creates hs_control.{c|h} that contains wrappers for the HS subsystem to interact with the control port subsystem. The descriptor REQUESTED event is implemented following proposal 284 extension for v3. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_client.c')
-rw-r--r--src/or/hs_client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index 9ac653c721..666860155c 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -21,6 +21,7 @@
#include "config.h"
#include "directory.h"
#include "hs_client.h"
+#include "hs_control.h"
#include "router.h"
#include "routerset.h"
#include "circuitlist.h"
@@ -349,6 +350,10 @@ directory_launch_v3_desc_fetch(const ed25519_public_key_t *onion_identity_pk,
safe_str_client(base64_blinded_pubkey),
safe_str_client(routerstatus_describe(hsdir)));
+ /* Fire a REQUESTED event on the control port. */
+ hs_control_desc_event_requested(onion_identity_pk, base64_blinded_pubkey,
+ hsdir);
+
/* Cleanup memory. */
memwipe(&blinded_pubkey, 0, sizeof(blinded_pubkey));
memwipe(base64_blinded_pubkey, 0, sizeof(base64_blinded_pubkey));