tor  master
Macros | Functions
hs_config.c File Reference

Implement hidden service configuration subsystem. More...

#include "hs_common.h"
#include "hs_config.h"
#include "hs_service.h"
#include "rendservice.h"
Include dependency graph for hs_config.c:

Functions

int hs_config_service_all (const or_options_t *options, int validate_only)
 

Detailed Description

Implement hidden service configuration subsystem.

This file has basically one main entry point: hs_config_service_all(). It takes the torrc options and configure hidden service from it. In validate mode, nothing is added to the global service list or keys are not generated nor loaded.

A service is configured in two steps. It is first created using the tor options and then put in a staging list. It will stay there until hs_service_load_all_keys() is called. That function is responsible to load/generate the keys for the service in the staging list and if successful, transfert the service to the main global service list where at that point it is ready to be used.

Configuration functions are per-version and there is a main generic one for every option that is common to all version (config_generic_service).