]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove rend_dh_handshake_state
authorNick Mathewson <nickm@torproject.org>
Mon, 2 Jun 2025 14:13:39 +0000 (10:13 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 10 Jun 2025 23:06:47 +0000 (19:06 -0400)
It became useless when we removed v2 onion services.

src/core/or/crypt_path.c
src/core/or/crypt_path_st.h

index 8f66caa498468fe7c111c2a35524c08d2f355f63..af131d4e57527ff44f06571f8910ade04951e6bc 100644 (file)
@@ -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);
 
index b2f4cd3087653ec0e3d817764f65d67a1bacb4c6..8b6eba01a7e70fc78e38b1c43d1aff00f8a422a2 100644 (file)
 #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 */