summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-01-16 13:19:44 -0500
committerDavid Goulet <dgoulet@torproject.org>2017-07-13 16:49:08 -0400
commit02e2edeb33224461d1fbb879722c0948171b9688 (patch)
tree2f70e922c8feff7afa87b2903c4d59c8952340e7 /src/or/config.c
parentb03853b65f109ed6a34ba2924fe3b00d56131ff5 (diff)
downloadtor-02e2edeb33224461d1fbb879722c0948171b9688.tar.gz
tor-02e2edeb33224461d1fbb879722c0948171b9688.zip
prop224: Add hs_config.{c|h} with a refactoring
Add the hs_config.{c|h} files contains everything that the HS subsystem needs to load and configure services. Ultimately, it should also contain client functions such as client authorization. This comes with a big refactoring of rend_config_services() which has now changed to only configure a single service and it is stripped down of the common directives which are now part of the generic handler. This is ground work for prop224 of course but only touches version 2 services and add XXX note for version 3. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 5b5bb9049b..062ab27ae7 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -91,6 +91,7 @@
#include "relay.h"
#include "rendclient.h"
#include "rendservice.h"
+#include "hs_config.h"
#include "rephist.h"
#include "router.h"
#include "sandbox.h"
@@ -1681,7 +1682,7 @@ options_act(const or_options_t *old_options)
sweep_bridge_list();
}
- if (running_tor && rend_config_services(options, 0)<0) {
+ if (running_tor && hs_config_service_all(options, 0)<0) {
log_warn(LD_BUG,
"Previously validated hidden services line could not be added!");
return -1;
@@ -4009,7 +4010,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
COMPLAIN("V3AuthVotingInterval does not divide evenly into 24 hours.");
}
- if (rend_config_services(options, 1) < 0)
+ if (hs_config_service_all(options, 1) < 0)
REJECT("Failed to configure rendezvous options. See logs for details.");
/* Parse client-side authorization for hidden services. */