diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-12-13 19:34:01 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-12-15 22:31:11 -0500 |
commit | b8a7bad7995fceee83e61f2f403685d42d8759ce (patch) | |
tree | d04e748ba1175325b01887439e674a7ab4df1c02 /src/or/rendclient.c | |
parent | 785086cfbaf15a78a921f5589a76517b1d4840b1 (diff) | |
download | tor-b8a7bad7995fceee83e61f2f403685d42d8759ce.tar.gz tor-b8a7bad7995fceee83e61f2f403685d42d8759ce.zip |
Make payloads into uint8_t.
This will avoid some signed/unsigned assignment-related bugs.
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 7023b7f271..feecf237c4 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -243,7 +243,7 @@ rend_client_rendcirc_has_opened(origin_circuit_t *circ) */ int rend_client_introduction_acked(origin_circuit_t *circ, - const char *request, size_t request_len) + const uint8_t *request, size_t request_len) { origin_circuit_t *rendcirc; (void) request; // XXXX Use this. @@ -628,7 +628,7 @@ rend_client_remove_intro_point(extend_info_t *failed_intro, * the circuit to C_REND_READY. */ int -rend_client_rendezvous_acked(origin_circuit_t *circ, const char *request, +rend_client_rendezvous_acked(origin_circuit_t *circ, const uint8_t *request, size_t request_len) { (void) request; @@ -654,7 +654,7 @@ rend_client_rendezvous_acked(origin_circuit_t *circ, const char *request, /** Bob sent us a rendezvous cell; join the circuits. */ int -rend_client_receive_rendezvous(origin_circuit_t *circ, const char *request, +rend_client_receive_rendezvous(origin_circuit_t *circ, const uint8_t *request, size_t request_len) { crypt_path_t *hop; @@ -682,7 +682,8 @@ rend_client_receive_rendezvous(origin_circuit_t *circ, const char *request, tor_assert(circ->build_state->pending_final_cpath); hop = circ->build_state->pending_final_cpath; tor_assert(hop->dh_handshake_state); - if (crypto_dh_compute_secret(hop->dh_handshake_state, request, DH_KEY_LEN, + if (crypto_dh_compute_secret(hop->dh_handshake_state, (char*)request, + DH_KEY_LEN, keys, DIGEST_LEN+CPATH_KEY_MATERIAL_LEN)<0) { log_warn(LD_GENERAL, "Couldn't complete DH handshake."); goto err; |