[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] hints for nick on where to integrate



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home/arma/work/onion/cvs/src/or

Modified Files:
	directory.c 
Log Message:
hints for nick on where to integrate


Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- directory.c	7 Apr 2003 02:12:02 -0000	1.9
+++ directory.c	7 May 2003 21:42:17 -0000	1.10
@@ -43,6 +43,7 @@
   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_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 @@
       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.");
     }