aboutsummaryrefslogtreecommitdiff
path: root/src/or/hs_service.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-02-01 09:18:58 -0500
committerDavid Goulet <dgoulet@torproject.org>2017-07-13 16:49:44 -0400
commit138e03c488bfa05504b69ced48ddf8f0afd1310c (patch)
treee6f0be3a485fa33572274797061864b0521066c8 /src/or/hs_service.h
parentf3899acdbfe121521cbd8cc76983b1e1e149d38c (diff)
downloadtor-138e03c488bfa05504b69ced48ddf8f0afd1310c.tar.gz
tor-138e03c488bfa05504b69ced48ddf8f0afd1310c.zip
prop224: Load and/or generate v3 service keys
Try to load or/and generate service keys for v3. This write both the public and private key file to disk along with the hostname file containing the onion address. 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, 6 insertions, 1 deletions
diff --git a/src/or/hs_service.h b/src/or/hs_service.h
index 8d92e75072..90606acb1c 100644
--- a/src/or/hs_service.h
+++ b/src/or/hs_service.h
@@ -13,6 +13,7 @@
#include "crypto_ed25519.h"
#include "replaycache.h"
+#include "hs_common.h"
#include "hs_descriptor.h"
#include "hs_intropoint.h"
@@ -172,6 +173,10 @@ typedef struct hs_service_t {
/* Protocol version of the service. Specified by HiddenServiceVersion. */
uint32_t version;
+ /* Onion address base32 encoded and NUL terminated. We keep it for logging
+ * purposes so we don't have to build it everytime. */
+ char onion_address[HS_SERVICE_ADDR_LEN_BASE32 + 1];
+
/* Hashtable node: use to look up the service by its master public identity
* key in the service global map. */
HT_ENTRY(hs_service_t) hs_service_node;
@@ -205,8 +210,8 @@ void hs_service_free_all(void);
hs_service_t *hs_service_new(const or_options_t *options);
void hs_service_free(hs_service_t *service);
-void hs_service_register_services(smartlist_t *new_service_list);
void hs_service_stage_services(const smartlist_t *service_list);
+int hs_service_load_all_keys(void);
/* These functions are only used by unit tests and we need to expose them else
* hs_service.o ends up with no symbols in libor.a which makes clang throw a