From 3d4ccb781ae5d74f0e16a63c89e08459d15cccf1 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 25 Sep 2003 05:17:11 +0000 Subject: Refactor buffers; implement descriptors. 'buf_t' is now an opaque type defined in buffers.c . Router descriptors now include all keys; routers generate keys as needed on startup (in a newly defined "data directory"), and generate their own descriptors. Descriptors are now self-signed. Implementation is not complete: descriptors are never published; and upon receiving a descriptor, the directory doesn't do anything with it. At least "routers.or" and orkeygen are now obsolete, BTW. svn:r483 --- src/or/config.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/or/config.c') diff --git a/src/or/config.c b/src/or/config.c index 4d0e51149..31b7e0235 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -189,10 +189,8 @@ static void config_assign(or_options_t *options, struct config_line *list) { /* string options */ config_compare(list, "LogLevel", CONFIG_TYPE_STRING, &options->LogLevel) || - config_compare(list, "PrivateKeyFile", CONFIG_TYPE_STRING, &options->PrivateKeyFile) || - config_compare(list, "SigningPrivateKeyFile", CONFIG_TYPE_STRING, &options->SigningPrivateKeyFile) || + config_compare(list, "DataDirectory", CONFIG_TYPE_STRING, &options->DataDirectory) || config_compare(list, "RouterFile", CONFIG_TYPE_STRING, &options->RouterFile) || - config_compare(list, "CertFile", CONFIG_TYPE_STRING, &options->CertFile) || config_compare(list, "Nickname", CONFIG_TYPE_STRING, &options->Nickname) || /* int options */ @@ -238,6 +236,7 @@ int getconfig(int argc, char **argv, or_options_t *options) { memset(options,0,sizeof(or_options_t)); options->LogLevel = "debug"; options->loglevel = LOG_DEBUG; + options->DataDirectory = NULL; options->CoinWeight = 0.8; options->MaxConn = 900; options->DirFetchPeriod = 600; @@ -246,7 +245,6 @@ int getconfig(int argc, char **argv, or_options_t *options) { options->NewCircuitPeriod = 60; /* once a minute */ options->TotalBandwidth = 800000; /* at most 800kB/s total sustained incoming */ options->NumCpus = 1; - options->CertFile = "default.cert"; /* learn config file name, get config lines, assign them */ i = 1; @@ -316,8 +314,8 @@ int getconfig(int argc, char **argv, or_options_t *options) { result = -1; } - if(options->OnionRouter && options->PrivateKeyFile == NULL) { - log(LOG_ERR,"PrivateKeyFile option required for OnionRouter, but not found."); + if(options->OnionRouter && options->DataDirectory == NULL) { + log(LOG_ERR,"DataDirectory option required for OnionRouter, but not found."); result = -1; } @@ -326,11 +324,6 @@ int getconfig(int argc, char **argv, or_options_t *options) { result = -1; } - if(options->DirPort > 0 && options->SigningPrivateKeyFile == NULL) { - log(LOG_ERR,"SigningPrivateKeyFile option required for DirServer, but not found."); - result = -1; - } - if(options->APPort < 0) { log(LOG_ERR,"APPort option can't be negative."); result = -1; -- cgit v1.2.3