diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-12-04 21:39:54 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-01-03 11:29:46 -0500 |
commit | 18c7d3f157957a5c8034e165d0fc09490c25b0ba (patch) | |
tree | cf67236953ce8d6d10ca0d287b0df9d2e4dab880 /src/or/circuitbuild.c | |
parent | f58d4dfcd61aec7ea1900873ca08ecc31d7a7ef7 (diff) | |
download | tor-18c7d3f157957a5c8034e165d0fc09490c25b0ba.tar.gz tor-18c7d3f157957a5c8034e165d0fc09490c25b0ba.zip |
Rename handshake_digest to rend_circ_nonce
The handshake_digest field was never meaningfully a digest *of* the
handshake, but rather is a digest *from* the handshake that we exapted
to prevent replays of ESTABLISH_INTRO cells. The ntor handshake will
generate it as more key material rather than taking it from any part
of the circuit handshake reply..
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 8393ba1717..40aad6d992 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1409,7 +1409,7 @@ circuit_finish_handshake(origin_circuit_t *circ, uint8_t reply_type, &hop->handshake_state, reply, (uint8_t*)keys, sizeof(keys), - (uint8_t*)hop->handshake_digest) < 0) { + (uint8_t*)hop->rend_circ_nonce) < 0) { log_warn(LD_CIRC,"onion_skin_client_handshake failed."); return -END_CIRC_REASON_TORPROTOCOL; } @@ -1517,9 +1517,9 @@ onionskin_answer(or_circuit_t *circ, uint8_t cell_type, const char *payload, /* XXXX Move responsibility for extracting this. */ if (cell_type == CELL_CREATED) - memcpy(circ->handshake_digest, cell.payload+DH_KEY_LEN, DIGEST_LEN); + memcpy(circ->rend_circ_nonce, cell.payload+DH_KEY_LEN, DIGEST_LEN); else - memcpy(circ->handshake_digest, cell.payload+DIGEST_LEN, DIGEST_LEN); + memcpy(circ->rend_circ_nonce, cell.payload+DIGEST_LEN, DIGEST_LEN); circ->is_first_hop = (cell_type == CELL_CREATED_FAST); |