tor

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

commit 6a6486a7bf327753b5bd84f4f2c113e331e41c1f
parent d7b8377c28bf90dcaddfc273a59f95e9690cacda
Author: Nick Mathewson <nickm@torproject.org>
Date:   Mon, 16 Dec 2019 13:05:01 -0500

hs_circuit: use struct declaration.

This frees us from a dependency on include order.

Diffstat:
Msrc/core/crypto/hs_ntor.h | 4++--
Msrc/feature/hs/hs_circuit.h | 5+++--
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/core/crypto/hs_ntor.h b/src/core/crypto/hs_ntor.h @@ -19,7 +19,7 @@ struct curve25519_keypair_t; (DIGEST256_LEN*2 + CIPHER256_KEY_LEN*2) /* Key material needed to encode/decode INTRODUCE1 cells */ -typedef struct { +typedef struct hs_ntor_intro_cell_keys_t { /* Key used for encryption of encrypted INTRODUCE1 blob */ uint8_t enc_key[CIPHER256_KEY_LEN]; /* MAC key used to protect encrypted INTRODUCE1 blob */ @@ -27,7 +27,7 @@ typedef struct { } hs_ntor_intro_cell_keys_t; /* Key material needed to encode/decode RENDEZVOUS1 cells */ -typedef struct { +typedef struct hs_ntor_rend_cell_keys_t { /* This is the MAC of the HANDSHAKE_INFO field */ uint8_t rend_cell_auth_mac[DIGEST256_LEN]; /* This is the key seed used to derive further rendezvous crypto keys as diff --git a/src/feature/hs/hs_circuit.h b/src/feature/hs/hs_circuit.h @@ -70,13 +70,14 @@ bool hs_circ_is_rend_sent_in_intro1(const origin_circuit_t *circ); #ifdef HS_CIRCUIT_PRIVATE +struct hs_ntor_rend_cell_keys_t; + STATIC hs_ident_circuit_t * create_rp_circuit_identifier(const hs_service_t *service, const uint8_t *rendezvous_cookie, const curve25519_public_key_t *server_pk, - const hs_ntor_rend_cell_keys_t *keys); + const struct hs_ntor_rend_cell_keys_t *keys); #endif /* defined(HS_CIRCUIT_PRIVATE) */ #endif /* !defined(TOR_HS_CIRCUIT_H) */ -