aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendmid.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-12-04 21:39:54 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-03 11:29:46 -0500
commit18c7d3f157957a5c8034e165d0fc09490c25b0ba (patch)
treecf67236953ce8d6d10ca0d287b0df9d2e4dab880 /src/or/rendmid.c
parentf58d4dfcd61aec7ea1900873ca08ecc31d7a7ef7 (diff)
downloadtor-18c7d3f157957a5c8034e165d0fc09490c25b0ba.tar
tor-18c7d3f157957a5c8034e165d0fc09490c25b0ba.tar.gz
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/rendmid.c')
-rw-r--r--src/or/rendmid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/rendmid.c b/src/or/rendmid.c
index dc2dc1d9e..8234265ca 100644
--- a/src/or/rendmid.c
+++ b/src/or/rendmid.c
@@ -56,8 +56,8 @@ rend_mid_establish_intro(or_circuit_t *circ, const uint8_t *request,
goto err;
}
- /* Next 20 bytes: Hash of handshake_digest | "INTRODUCE" */
- memcpy(buf, circ->handshake_digest, DIGEST_LEN);
+ /* Next 20 bytes: Hash of rend_circ_nonce | "INTRODUCE" */
+ memcpy(buf, circ->rend_circ_nonce, DIGEST_LEN);
memcpy(buf+DIGEST_LEN, "INTRODUCE", 9);
if (crypto_digest(expected_digest, buf, DIGEST_LEN+9) < 0) {
log_warn(LD_BUG, "Internal error computing digest.");