summaryrefslogtreecommitdiff
path: root/src/or/hs_intropoint.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-02-03 15:30:46 -0500
committerNick Mathewson <nickm@torproject.org>2017-08-08 20:29:33 -0400
commit00a02a3a59f6e44619e6caed150b001acae37231 (patch)
tree5b58a26b283d85688b8f4d524a0c67562c93b47a /src/or/hs_intropoint.c
parentc4ba4d4cc8a1d31f78d1dc54c7851bed32a25e5c (diff)
downloadtor-00a02a3a59f6e44619e6caed150b001acae37231.tar.gz
tor-00a02a3a59f6e44619e6caed150b001acae37231.zip
prop224: Service v3 descriptor creation and logic
This commit adds the functionality for a service to build its descriptor. Also, a global call to build all descriptors for all services is added to the service scheduled events. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_intropoint.c')
-rw-r--r--src/or/hs_intropoint.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c
index 2abbfcd6c3..25c43b3ad3 100644
--- a/src/or/hs_intropoint.c
+++ b/src/or/hs_intropoint.c
@@ -24,6 +24,7 @@
#include "hs/cell_introduce1.h"
#include "hs_circuitmap.h"
+#include "hs_descriptor.h"
#include "hs_intropoint.h"
#include "hs_common.h"
@@ -594,3 +595,16 @@ hs_intro_received_introduce1(or_circuit_t *circ, const uint8_t *request,
return -1;
}
+/* Free the given intropoint object ip. */
+void
+hs_intro_free_content(hs_intropoint_t *ip)
+{
+ if (ip == NULL) {
+ return;
+ }
+ tor_cert_free(ip->auth_key_cert);
+ SMARTLIST_FOREACH(ip->link_specifiers, hs_desc_link_specifier_t *, ls,
+ hs_desc_link_specifier_free(ls));
+ smartlist_free(ip->link_specifiers);
+}
+