mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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:
+3
-3
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user