aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2011-06-13 16:12:47 -0700
committerRobert Ransom <rransom.8774@gmail.com>2011-06-14 21:32:49 -0700
commit44eafa9697b0adebfa5e18579adcf70cd6d9c935 (patch)
tree50f9567843657ee2cf7c04381bcfa4bffee7f378 /src/or/rendservice.c
parentecc9a364c2ff8557f808dc1826e285239a5767a8 (diff)
downloadtor-44eafa9697b0adebfa5e18579adcf70cd6d9c935.tar.gz
tor-44eafa9697b0adebfa5e18579adcf70cd6d9c935.zip
Assert that HS operations are not performed using single-hop circuits
(with fixes by Nick Mathewson to unbreak the build)
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 79abc57ee1..80fa35713a 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -905,6 +905,7 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request,
time_t *access_time;
or_options_t *options = get_options();
+ tor_assert(!(circuit->build_state->onehop_tunnel));
tor_assert(circuit->rend_data);
base32_encode(serviceid, REND_SERVICE_ID_LEN_BASE32+1,
@@ -1359,6 +1360,7 @@ rend_service_intro_has_opened(origin_circuit_t *circuit)
crypto_pk_env_t *intro_key;
tor_assert(circuit->_base.purpose == CIRCUIT_PURPOSE_S_ESTABLISH_INTRO);
+ tor_assert(!(circuit->build_state->onehop_tunnel));
tor_assert(circuit->cpath);
tor_assert(circuit->rend_data);
@@ -1501,6 +1503,7 @@ rend_service_rendezvous_has_opened(origin_circuit_t *circuit)
tor_assert(circuit->_base.purpose == CIRCUIT_PURPOSE_S_CONNECT_REND);
tor_assert(circuit->cpath);
tor_assert(circuit->build_state);
+ tor_assert(!(circuit->build_state->onehop_tunnel));
tor_assert(circuit->rend_data);
hop = circuit->build_state->pending_final_cpath;
tor_assert(hop);