time_t now = time(NULL);
char diffie_hellman_hash[DIGEST_LEN];
time_t *access_time;
- or_options_t *options = get_options();
+ const or_options_t *options = get_options();
+ if (circuit->_base.purpose != CIRCUIT_PURPOSE_S_INTRO) {
+ log_warn(LD_PROTOCOL,
+ "Got an INTRODUCE2 over a non-introduction circuit %d.",
+ circuit->_base.n_circ_id);
+ return -1;
+ }
+
+#ifndef NON_ANONYMOUS_MODE_ENABLED
+ tor_assert(!(circuit->build_state->onehop_tunnel));
+#endif
tor_assert(circuit->rend_data);
base32_encode(serviceid, REND_SERVICE_ID_LEN_BASE32+1,