aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-12-04 21:27:07 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-03 11:29:46 -0500
commitf58d4dfcd61aec7ea1900873ca08ecc31d7a7ef7 (patch)
tree12e9b9fbcbbaf319638926575b913daaea05f7e9 /src/or/circuitlist.c
parent5fa1c7484cba293e6467acbca06a4143ce9da68d (diff)
downloadtor-f58d4dfcd61aec7ea1900873ca08ecc31d7a7ef7.tar.gz
tor-f58d4dfcd61aec7ea1900873ca08ecc31d7a7ef7.zip
Massive refactoring of the various handshake types
The three handshake types are now accessed from a unified interface; their state is abstracted from the rest of the cpath state, and so on.
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 2c17fd2bbd..2565470e29 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -744,8 +744,8 @@ circuit_free_cpath_node(crypt_path_t *victim)
crypto_cipher_free(victim->b_crypto);
crypto_digest_free(victim->f_digest);
crypto_digest_free(victim->b_digest);
- crypto_dh_free(victim->dh_handshake_state);
- fast_handshake_state_free(victim->fast_handshake_state);
+ onion_handshake_state_release(&victim->handshake_state);
+ crypto_dh_free(victim->rend_dh_handshake_state);
extend_info_free(victim->extend_info);
memwipe(victim, 0xBB, sizeof(crypt_path_t)); /* poison memory */
@@ -1494,7 +1494,8 @@ assert_cpath_layer_ok(const crypt_path_t *cp)
tor_assert(cp->b_crypto);
/* fall through */
case CPATH_STATE_CLOSED:
- tor_assert(!cp->dh_handshake_state);
+ /*XXXX Assert that there's no handshake_state either. */
+ tor_assert(!cp->rend_dh_handshake_state);
break;
case CPATH_STATE_AWAITING_KEYS:
/* tor_assert(cp->dh_handshake_state); */