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/cpuworker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/or/cpuworker.c') diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index 6cf21e861b..d3d945e7e6 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -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."); -- cgit v1.2.3-54-g00ecf