summaryrefslogtreecommitdiff
path: root/src/test/test_hs_client.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-01 11:25:29 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-01 11:25:29 -0400
commit7a61a92870df84c37bacd9d065e0c8df2b938d37 (patch)
tree444e1a8cf7e9bd1f12685d614459ce1ad122eb42 /src/test/test_hs_client.c
parentadcd1d8b9ac09f3abc11e2e3187fe363ad3df2fd (diff)
downloadtor-7a61a92870df84c37bacd9d065e0c8df2b938d37.tar.gz
tor-7a61a92870df84c37bacd9d065e0c8df2b938d37.zip
Combine DH_BYTES and DH_KEY_LEN; put them in a lib/defs header.
Diffstat (limited to 'src/test/test_hs_client.c')
-rw-r--r--src/test/test_hs_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c
index 58002d6292..3a4d35431e 100644
--- a/src/test/test_hs_client.c
+++ b/src/test/test_hs_client.c
@@ -197,17 +197,17 @@ test_e2e_rend_circuit_setup_legacy(void *arg)
/* Make a good RENDEZVOUS1 cell body because it needs to pass key exchange
* digest verification... */
- uint8_t rend_cell_body[DH_KEY_LEN+DIGEST_LEN] = {2};
+ uint8_t rend_cell_body[DH1024_KEY_LEN+DIGEST_LEN] = {2};
{
char keys[DIGEST_LEN+CPATH_KEY_MATERIAL_LEN];
crypto_dh_t *dh_state =
or_circ->build_state->pending_final_cpath->rend_dh_handshake_state;
/* compute and overwrite digest of cell body with the right value */
retval = crypto_dh_compute_secret(LOG_PROTOCOL_WARN, dh_state,
- (char*)rend_cell_body, DH_KEY_LEN,
+ (char*)rend_cell_body, DH1024_KEY_LEN,
keys, DIGEST_LEN+CPATH_KEY_MATERIAL_LEN);
tt_int_op(retval, OP_GT, 0);
- memcpy(rend_cell_body+DH_KEY_LEN, keys, DIGEST_LEN);
+ memcpy(rend_cell_body+DH1024_KEY_LEN, keys, DIGEST_LEN);
}
/* Setup the circuit */