summaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
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/rendservice.c
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/rendservice.c')
-rw-r--r--src/or/rendservice.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index e86119f2d0..358efd0ed9 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1046,15 +1046,8 @@ rend_service_update_descriptor(rend_service_t *service)
static char *
rend_service_path(const rend_service_t *service, const char *file_name)
{
- char *file_path = NULL;
-
tor_assert(service->directory);
-
- /* Can never fail: asserts rather than leaving file_path NULL. */
- tor_asprintf(&file_path, "%s%s%s",
- service->directory, PATH_SEPARATOR, file_name);
-
- return file_path;
+ return hs_path_from_filename(service->directory, file_name);
}
/* Allocate and return a string containing the path to the single onion