From: Nick Mathewson Date: Mon, 2 Jun 2025 14:13:39 +0000 (-0400) Subject: Remove rend_dh_handshake_state X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5721efc427ee1c0f826239395af9cd8d72f6634c;p=thirdparty%2Ftor.git Remove rend_dh_handshake_state It became useless when we removed v2 onion services. --- diff --git a/src/core/or/crypt_path.c b/src/core/or/crypt_path.c index 8f66caa498..af131d4e57 100644 --- 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 index b2f4cd3087..8b6eba01a7 100644 --- 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 */