aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/directory.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index e604445fe..7a835f39e 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -43,6 +43,7 @@ void directory_initiate_fetch(routerinfo_t *router) {
conn->address = strdup(router->address);
conn->receiver_bucket = -1; /* edge connections don't do receiver buckets */
conn->bandwidth = -1;
+ conn->pkey = crypto_pk_dup_key(router->signing_pkey);
s=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP);
if(s < 0) {
@@ -116,6 +117,8 @@ void directory_set_dirty(void) {
void directory_rebuild(void) {
if(directory_dirty) {
+/* NICK: This is where the dirserver makes a new <the_directory,directorylen>
+ * (or whatever it'll be called in the future) pair. */
dump_directory_to_string(the_directory, MAX_DIR_SIZE);
log(LOG_INFO,"New directory:\n%s",the_directory);
directorylen = strlen(the_directory);
@@ -141,6 +144,8 @@ int connection_dir_process_inbuf(connection_t *conn) {
log(LOG_DEBUG,"connection_dir_process_inbuf(): Empty directory. Ignoring.");
return -1;
}
+/* NICK: This is where the client parses, checks-the-signature-of, etc the
+ * new directory. conn->pkey is the signing key of the directory server we chose. */
if(router_get_list_from_string(the_directory) < 0) {
log(LOG_DEBUG,"connection_dir_process_inbuf(): ...but parsing failed. Ignoring.");
}