|
@@ -93,20 +93,11 @@ rend_client_send_introduction(circuit_t *introcirc, circuit_t *rendcirc) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-#if 0
|
|
|
tmp[0] = 1;
|
|
|
strncpy(tmp+1, rendcirc->build_state->chosen_exit_name, (MAX_HEX_NICKNAME_LEN+1));
|
|
|
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));
|
|
|
- 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) {
|
|
|
|
|
|
* 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.");
|