summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-15 13:49:30 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-15 13:49:30 -0400
commit62315dab8420e44d8d469f858e88b7b4fe384122 (patch)
tree9dcbad4fa74109b0130ea8df04a26d394881706c /src
parent50369f8981e8ce0894753daeea3dc28ab01f2667 (diff)
downloadtor-62315dab8420e44d8d469f858e88b7b4fe384122.tar.gz
tor-62315dab8420e44d8d469f858e88b7b4fe384122.zip
Extract ns_detached_signatures_st into its own header.
Diffstat (limited to 'src')
-rw-r--r--src/or/dirauth/dirvote.c1
-rw-r--r--src/or/include.am1
-rw-r--r--src/or/networkstatus.c1
-rw-r--r--src/or/ns_detached_signatures_st.h22
-rw-r--r--src/or/or.h12
-rw-r--r--src/or/routerparse.c1
-rw-r--r--src/test/test_dir.c1
7 files changed, 28 insertions, 11 deletions
diff --git a/src/or/dirauth/dirvote.c b/src/or/dirauth/dirvote.c
index aa30a11f5c..c402bcb799 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 e6f23e916d..7dcb725731 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 8ad1bb25b7..0c351f0e40 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 0000000000..4cb37de632
--- /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 43fe09f23b..d6a42bd9da 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 ab64b1c825..be6ed00e25 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 10169a70cf..76f3b13f6e 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"