summaryrefslogtreecommitdiff
path: root/src/or/rendclient.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-01-13 20:21:11 +0000
committerRoger Dingledine <arma@torproject.org>2005-01-13 20:21:11 +0000
commit22f7934718f505cc04bbb4b1ee3a09e38e10d272 (patch)
tree6cf7ca114fd1c12aac42a2ad33895b69abb29dcb /src/or/rendclient.c
parent0703d01b13e6f594c51357bad273e0b26078c13c (diff)
downloadtor-22f7934718f505cc04bbb4b1ee3a09e38e10d272.tar.gz
tor-22f7934718f505cc04bbb4b1ee3a09e38e10d272.zip
start generating version 1 style introduce cells
svn:r3352
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r--src/or/rendclient.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index cf16eb7337..be54895249 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -93,20 +93,11 @@ rend_client_send_introduction(circuit_t *introcirc, circuit_t *rendcirc) {
}
/* write the remaining items into tmp */
-#if 0 /* switch over when 0.0.9pre4 is obsolete */
tmp[0] = 1; /* version 1 of the cell format */
strncpy(tmp+1, rendcirc->build_state->chosen_exit_name, (MAX_HEX_NICKNAME_LEN+1)); /* nul pads */
memcpy(tmp+1+MAX_HEX_NICKNAME_LEN+1, rendcirc->rend_cookie, REND_COOKIE_LEN);
-#else
- 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 0
tmp+1+MAX_HEX_NICKNAME_LEN+1+REND_COOKIE_LEN,
-#else
- tmp+MAX_NICKNAME_LEN+1+REND_COOKIE_LEN,
-#endif
DH_KEY_LEN)<0) {
log_fn(LOG_WARN, "Couldn't extract g^x");
goto err;
@@ -115,11 +106,7 @@ rend_client_send_introduction(circuit_t *introcirc, circuit_t *rendcirc) {
/*XXX maybe give crypto_pk_public_hybrid_encrypt a max_len arg,
* to avoid buffer overflows? */
r = crypto_pk_public_hybrid_encrypt(entry->parsed->pk, payload+DIGEST_LEN, tmp,
-#if 0
1+MAX_HEX_NICKNAME_LEN+1+REND_COOKIE_LEN+DH_KEY_LEN,
-#else
- MAX_NICKNAME_LEN+1+REND_COOKIE_LEN+DH_KEY_LEN,
-#endif
PK_PKCS1_OAEP_PADDING, 0);
if (r<0) {
log_fn(LOG_WARN,"hybrid pk encrypt failed.");