diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-12-04 21:27:07 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-01-03 11:29:46 -0500 |
commit | f58d4dfcd61aec7ea1900873ca08ecc31d7a7ef7 (patch) | |
tree | 12e9b9fbcbbaf319638926575b913daaea05f7e9 /src/or/rendservice.c | |
parent | 5fa1c7484cba293e6467acbca06a4143ce9da68d (diff) | |
download | tor-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/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 09792bd1d7..08a7feb3ec 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -1378,7 +1378,7 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request, cpath->magic = CRYPT_PATH_MAGIC; launched->build_state->expiry_time = now + MAX_REND_TIMEOUT; - cpath->dh_handshake_state = dh; + cpath->rend_dh_handshake_state = dh; dh = NULL; if (circuit_init_cpath_crypto(cpath,keys+DIGEST_LEN,1)<0) goto err; @@ -2624,7 +2624,7 @@ rend_service_rendezvous_has_opened(origin_circuit_t *circuit) /* All we need to do is send a RELAY_RENDEZVOUS1 cell... */ memcpy(buf, circuit->rend_data->rend_cookie, REND_COOKIE_LEN); - if (crypto_dh_get_public(hop->dh_handshake_state, + if (crypto_dh_get_public(hop->rend_dh_handshake_state, buf+REND_COOKIE_LEN, DH_KEY_LEN)<0) { log_warn(LD_GENERAL,"Couldn't get DH public key."); reason = END_CIRC_REASON_INTERNAL; @@ -2643,8 +2643,8 @@ rend_service_rendezvous_has_opened(origin_circuit_t *circuit) goto err; } - crypto_dh_free(hop->dh_handshake_state); - hop->dh_handshake_state = NULL; + crypto_dh_free(hop->rend_dh_handshake_state); + hop->rend_dh_handshake_state = NULL; /* Append the cpath entry. */ hop->state = CPATH_STATE_OPEN; |