diff options
author | Roger Dingledine <arma@torproject.org> | 2003-12-16 08:21:58 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-12-16 08:21:58 +0000 |
commit | 961ecf7abfc80571ab858099d1d4f6362b791ea0 (patch) | |
tree | e4535e6a65296391d1819ac8fceaebeef25e3b4d /src/or/command.c | |
parent | f3b165fdc0b945b5d30a81db7d818d2445487520 (diff) | |
download | tor-961ecf7abfc80571ab858099d1d4f6362b791ea0.tar.gz tor-961ecf7abfc80571ab858099d1d4f6362b791ea0.zip |
add H(K|1) to the onionskin reply
verify it at the client end
abstract the onionskin handshake lengths
breaks backward compatibility (again)
svn:r941
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/command.c b/src/or/command.c index fa83d23c83..ed0a8d04d0 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -103,7 +103,7 @@ static void command_process_create_cell(cell_t *cell, connection_t *conn) { circ = circuit_new(cell->circ_id, conn); circ->state = CIRCUIT_STATE_ONIONSKIN_PENDING; - if(cell->length != DH_ONIONSKIN_LEN) { + if(cell->length != ONIONSKIN_CHALLENGE_LEN) { log_fn(LOG_WARN,"Bad cell length %d. Dropping.", cell->length); circuit_close(circ); return; @@ -135,7 +135,7 @@ static void command_process_created_cell(cell_t *cell, connection_t *conn) { circuit_close(circ); return; } - assert(cell->length == DH_KEY_LEN); + assert(cell->length == ONIONSKIN_REPLY_LEN); if(circ->cpath) { /* we're the OP. Handshake this. */ log_fn(LOG_DEBUG,"at OP. Finishing handshake."); @@ -153,7 +153,7 @@ static void command_process_created_cell(cell_t *cell, connection_t *conn) { } else { /* pack it into an extended relay cell, and send it. */ log_fn(LOG_INFO,"Converting created cell to extended relay cell, sending."); connection_edge_send_command(NULL, circ, RELAY_COMMAND_EXTENDED, - cell->payload, DH_KEY_LEN, NULL); + cell->payload, cell->length, NULL); } } |