tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 5721efc427ee1c0f826239395af9cd8d72f6634c
parent e5535d84aeaacff79f056edd4432de30c5b63bc5
Author: Nick Mathewson <nickm@torproject.org>
Date:   Mon,  2 Jun 2025 10:13:39 -0400

Remove rend_dh_handshake_state

It became useless when we removed v2 onion services.

Diffstat:
Msrc/core/or/crypt_path.c | 4----
Msrc/core/or/crypt_path_st.h | 5-----
2 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/src/core/or/crypt_path.c b/src/core/or/crypt_path.c @@ -116,11 +116,8 @@ cpath_assert_layer_ok(const crypt_path_t *cp) relay_crypto_assert_ok(&cp->pvt_crypto); FALLTHROUGH; case CPATH_STATE_CLOSED: - /*XXXX Assert that there's no handshake_state either. */ - tor_assert(!cp->rend_dh_handshake_state); break; case CPATH_STATE_AWAITING_KEYS: - /* tor_assert(cp->dh_handshake_state); */ break; default: log_fn(LOG_ERR, LD_BUG, "Unexpected state %d", cp->state); @@ -166,7 +163,6 @@ cpath_free(crypt_path_t *victim) relay_crypto_clear(&victim->pvt_crypto); onion_handshake_state_release(&victim->handshake_state); - crypto_dh_free(victim->rend_dh_handshake_state); extend_info_free(victim->extend_info); congestion_control_free(victim->ccontrol); diff --git a/src/core/or/crypt_path_st.h b/src/core/or/crypt_path_st.h @@ -13,13 +13,11 @@ #define CRYPT_PATH_ST_H #include "core/crypto/relay_crypto_st.h" -struct crypto_dh_t; #define CRYPT_PATH_MAGIC 0x70127012u struct fast_handshake_state_t; struct ntor_handshake_state_t; -struct crypto_dh_t; struct onion_handshake_state_t { /** One of `ONION_HANDSHAKE_TYPE_*`. Determines which member of the union * is accessible. */ @@ -54,9 +52,6 @@ struct crypt_path_t { /** Current state of the handshake as performed with the OR at this * step. */ onion_handshake_state_t handshake_state; - /** Diffie-hellman handshake state for performing an introduction - * operations */ - struct crypto_dh_t *rend_dh_handshake_state; /** Negotiated key material shared with the OR at this step. */ char rend_circ_nonce[DIGEST_LEN];/* KH in tor-spec.txt */