commit 62315dab8420e44d8d469f858e88b7b4fe384122 Author: Nick Mathewson nickm@torproject.org Date: Fri Jun 15 13:49:30 2018 -0400
Extract ns_detached_signatures_st into its own header. --- src/or/dirauth/dirvote.c | 1 + src/or/include.am | 1 + src/or/networkstatus.c | 1 + src/or/ns_detached_signatures_st.h | 22 ++++++++++++++++++++++ src/or/or.h | 12 +----------- src/or/routerparse.c | 1 + src/test/test_dir.c | 1 + 7 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/src/or/dirauth/dirvote.c b/src/or/dirauth/dirvote.c index aa30a11f5..c402bcb79 100644 --- a/src/or/dirauth/dirvote.c +++ b/src/or/dirauth/dirvote.c @@ -33,6 +33,7 @@ #include "networkstatus_st.h" #include "networkstatus_voter_info_st.h" #include "node_st.h" +#include "ns_detached_signatures_st.h" #include "vote_microdesc_hash_st.h" #include "vote_routerstatus_st.h" #include "vote_timing_st.h" diff --git a/src/or/include.am b/src/or/include.am index e6f23e916..7dcb72573 100644 --- a/src/or/include.am +++ b/src/or/include.am @@ -253,6 +253,7 @@ ORHEADERS = \ src/or/networkstatus_voter_info_st.h \ src/or/nodelist.h \ src/or/node_st.h \ + src/or/ns_detached_signatures_st.h \ src/or/ntmain.h \ src/or/onion.h \ src/or/onion_fast.h \ diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 8ad1bb25b..0c351f0e4 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -79,6 +79,7 @@ #include "document_signature_st.h" #include "networkstatus_st.h" #include "networkstatus_voter_info_st.h" +#include "ns_detached_signatures_st.h" #include "node_st.h" #include "vote_microdesc_hash_st.h" #include "vote_routerstatus_st.h" diff --git a/src/or/ns_detached_signatures_st.h b/src/or/ns_detached_signatures_st.h new file mode 100644 index 000000000..4cb37de63 --- /dev/null +++ b/src/or/ns_detached_signatures_st.h @@ -0,0 +1,22 @@ +/* Copyright (c) 2001 Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2017, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +#ifndef NS_DETACHED_SIGNATURES_ST_H +#define NS_DETACHED_SIGNATURES_ST_H + +/** A set of signatures for a networkstatus consensus. Unless otherwise + * noted, all fields are as for networkstatus_t. */ +struct ns_detached_signatures_t { + time_t valid_after; + time_t fresh_until; + time_t valid_until; + strmap_t *digests; /**< Map from flavor name to digestset_t */ + strmap_t *signatures; /**< Map from flavor name to list of + * document_signature_t */ +}; + +#endif + diff --git a/src/or/or.h b/src/or/or.h index 43fe09f23..d6a42bd9d 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1883,17 +1883,7 @@ typedef enum { #define N_CONSENSUS_FLAVORS ((int)(FLAV_MICRODESC)+1)
typedef struct networkstatus_t networkstatus_t; - -/** A set of signatures for a networkstatus consensus. Unless otherwise - * noted, all fields are as for networkstatus_t. */ -typedef struct ns_detached_signatures_t { - time_t valid_after; - time_t fresh_until; - time_t valid_until; - strmap_t *digests; /**< Map from flavor name to digestset_t */ - strmap_t *signatures; /**< Map from flavor name to list of - * document_signature_t */ -} ns_detached_signatures_t; +typedef struct ns_detached_signatures_t ns_detached_signatures_t;
/** Allowable types of desc_store_t. */ typedef enum store_type_t { diff --git a/src/or/routerparse.c b/src/or/routerparse.c index ab64b1c82..be6ed00e2 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -84,6 +84,7 @@ #include "document_signature_st.h" #include "networkstatus_st.h" #include "networkstatus_voter_info_st.h" +#include "ns_detached_signatures_st.h" #include "rend_authorized_client_st.h" #include "rend_intro_point_st.h" #include "rend_service_descriptor_st.h" diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 10169a70c..76f3b13f6 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -48,6 +48,7 @@ #include "document_signature_st.h" #include "networkstatus_st.h" #include "networkstatus_voter_info_st.h" +#include "ns_detached_signatures_st.h" #include "port_cfg_st.h" #include "tor_version_st.h" #include "vote_microdesc_hash_st.h"
tor-commits@lists.torproject.org