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
This commit is contained in:
Nick Mathewson
2003-09-25 05:17:11 +00:00
parent a3bd8b5483
commit 3d4ccb781a
20 changed files with 882 additions and 480 deletions
+3 -3
View File
@@ -73,9 +73,9 @@ int connection_cpu_process_inbuf(connection_t *conn) {
}
if(conn->state == CPUWORKER_STATE_BUSY_ONION) {
if(conn->inbuf_datalen < LEN_ONION_RESPONSE) /* entire answer available? */
if(buf_datalen(conn->inbuf) < LEN_ONION_RESPONSE) /* entire answer available? */
return 0; /* not yet */
assert(conn->inbuf_datalen == LEN_ONION_RESPONSE);
assert(buf_datalen(conn->inbuf) == LEN_ONION_RESPONSE);
connection_fetch_from_buf(buf,LEN_ONION_RESPONSE,conn);
@@ -147,7 +147,7 @@ int cpuworker_main(void *data) {
}
if(question_type == CPUWORKER_TASK_ONION) {
if(onion_skin_server_handshake(question, get_privatekey(),
if(onion_skin_server_handshake(question, get_onion_key(),
reply_to_proxy, keys, 32) < 0) {
/* failure */
log_fn(LOG_ERR,"onion_skin_server_handshake failed.");