aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendclient.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-05-02 22:35:18 +0000
committerNick Mathewson <nickm@torproject.org>2005-05-02 22:35:18 +0000
commitab34901263c6593a56c039979e04bf9345932dd1 (patch)
tree5cc0591eb4f02fde0e441df1be5a678736f917aa /src/or/rendclient.c
parent16184f62dcb40fce82f1170b31a161d314dfc81f (diff)
downloadtor-ab34901263c6593a56c039979e04bf9345932dd1.tar
tor-ab34901263c6593a56c039979e04bf9345932dd1.tar.gz
New and frightening code to implement fast-path first-hop CREATE_FAST cells. Watch out when we bump the version to 0.1.0.6-rc!
svn:r4162
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r--src/or/rendclient.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 8ef23710d..4e87146d5 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -83,11 +83,11 @@ rend_client_send_introduction(circuit_t *introcirc, circuit_t *rendcirc) {
cpath = rendcirc->build_state->pending_final_cpath =
tor_malloc_zero(sizeof(crypt_path_t));
cpath->magic = CRYPT_PATH_MAGIC;
- if (!(cpath->handshake_state = crypto_dh_new())) {
+ if (!(cpath->dh_handshake_state = crypto_dh_new())) {
log_fn(LOG_WARN, "Couldn't allocate DH");
goto err;
}
- if (crypto_dh_generate_public(cpath->handshake_state)<0) {
+ if (crypto_dh_generate_public(cpath->dh_handshake_state)<0) {
log_fn(LOG_WARN, "Couldn't generate g^x");
goto err;
}
@@ -103,7 +103,7 @@ rend_client_send_introduction(circuit_t *introcirc, circuit_t *rendcirc) {
strncpy(tmp, rendcirc->build_state->chosen_exit_name, (MAX_NICKNAME_LEN+1)); /* nul pads */
memcpy(tmp+MAX_NICKNAME_LEN+1, rendcirc->rend_cookie, REND_COOKIE_LEN);
#endif
- if (crypto_dh_get_public(cpath->handshake_state,
+ if (crypto_dh_get_public(cpath->dh_handshake_state,
#if 0
tmp+1+MAX_HEX_NICKNAME_LEN+1+REND_COOKIE_LEN,
#else
@@ -338,8 +338,8 @@ rend_client_receive_rendezvous(circuit_t *circ, const char *request, size_t requ
tor_assert(circ->build_state);
tor_assert(circ->build_state->pending_final_cpath);
hop = circ->build_state->pending_final_cpath;
- tor_assert(hop->handshake_state);
- if (crypto_dh_compute_secret(hop->handshake_state, request, DH_KEY_LEN,
+ tor_assert(hop->dh_handshake_state);
+ if (crypto_dh_compute_secret(hop->dh_handshake_state, request, DH_KEY_LEN,
keys, DIGEST_LEN+CPATH_KEY_MATERIAL_LEN)<0) {
log_fn(LOG_WARN, "Couldn't complete DH handshake");
goto err;
@@ -354,8 +354,8 @@ rend_client_receive_rendezvous(circuit_t *circ, const char *request, size_t requ
goto err;
}
- crypto_dh_free(hop->handshake_state);
- hop->handshake_state = NULL;
+ crypto_dh_free(hop->dh_handshake_state);
+ hop->dh_handshake_state = NULL;
/* All is well. Extend the circuit. */
circ->purpose = CIRCUIT_PURPOSE_C_REND_JOINED;