[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] hs_circuit: use struct declaration.



commit 6a6486a7bf327753b5bd84f4f2c113e331e41c1f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Dec 16 13:05:01 2019 -0500

    hs_circuit: use struct declaration.
    
    This frees us from a dependency on include order.
---
 src/core/crypto/hs_ntor.h   | 4 ++--
 src/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
index 5a70974a0..e3bf006a4 100644
--- 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
index c044ad89c..a11e9e452 100644
--- 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) */
-



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits