]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Move document_signature_t into its own header.
authorNick Mathewson <nickm@torproject.org>
Fri, 15 Jun 2018 17:27:11 +0000 (13:27 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 15 Jun 2018 17:27:11 +0000 (13:27 -0400)
src/or/dirauth/dirvote.c
src/or/document_signature_st.h [new file with mode: 0644]
src/or/include.am
src/or/networkstatus.c
src/or/or.h
src/or/routerlist.c
src/or/routerparse.c
src/test/test_dir.c

index c702ca697432663399e27cf211210c6e0b6e53fb..12ab5f328983c098ec079730eaa3275811c28d68 100644 (file)
@@ -29,6 +29,7 @@
 #include "dirauth/shared_random_state.h"
 
 #include "dir_server_st.h"
+#include "document_signature_st.h"
 #include "node_st.h"
 #include "vote_microdesc_hash_st.h"
 #include "vote_routerstatus_st.h"
diff --git a/src/or/document_signature_st.h b/src/or/document_signature_st.h
new file mode 100644 (file)
index 0000000..ec0b1ba
--- /dev/null
@@ -0,0 +1,29 @@
+/* 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 DOCUMENT_SIGNATURE_ST_H
+#define DOCUMENT_SIGNATURE_ST_H
+
+/** A signature of some document by an authority. */
+struct document_signature_t {
+  /** Declared SHA-1 digest of this voter's identity key */
+  char identity_digest[DIGEST_LEN];
+  /** Declared SHA-1 digest of signing key used by this voter. */
+  char signing_key_digest[DIGEST_LEN];
+  /** Algorithm used to compute the digest of the document. */
+  digest_algorithm_t alg;
+  /** Signature of the signed thing. */
+  char *signature;
+  /** Length of <b>signature</b> */
+  int signature_len;
+  unsigned int bad_signature : 1; /**< Set to true if we've tried to verify
+                                   * the sig, and we know it's bad. */
+  unsigned int good_signature : 1; /**< Set to true if we've verified the sig
+                                     * as good. */
+};
+
+#endif
+
index d9eeb15f3ccee447acb045fe5866235f9e8755fd..611b1adbce182fe6454c7e4fea428276e1fb6f14 100644 (file)
@@ -214,6 +214,7 @@ ORHEADERS = \
        src/or/dirserv.h                                \
        src/or/dir_connection_st.h                      \
        src/or/dir_server_st.h                          \
+       src/or/document_signature_st.h                  \
        src/or/dns.h                                    \
        src/or/dns_structs.h                            \
        src/or/dnsserv.h                                \
index 3f90fea4e11c155f48221fc6b8e9c3b7fe0e33b2..1bea0d774d2e1de2051e8b54f7e87b4cc4880d50 100644 (file)
@@ -76,6 +76,7 @@
 
 #include "dir_connection_st.h"
 #include "dir_server_st.h"
+#include "document_signature_st.h"
 #include "node_st.h"
 #include "vote_microdesc_hash_st.h"
 #include "vote_routerstatus_st.h"
index 23f565857b5dfe41c2d5b90a6253fa114bae5759..ab1ae5742b89c946907d41eb4dc1db49469bd3e4 100644 (file)
@@ -1860,24 +1860,7 @@ typedef struct microdesc_t {
 typedef struct node_t node_t;
 typedef struct vote_microdesc_hash_t vote_microdesc_hash_t;
 typedef struct vote_routerstatus_t vote_routerstatus_t;
-
-/** A signature of some document by an authority. */
-typedef struct document_signature_t {
-  /** Declared SHA-1 digest of this voter's identity key */
-  char identity_digest[DIGEST_LEN];
-  /** Declared SHA-1 digest of signing key used by this voter. */
-  char signing_key_digest[DIGEST_LEN];
-  /** Algorithm used to compute the digest of the document. */
-  digest_algorithm_t alg;
-  /** Signature of the signed thing. */
-  char *signature;
-  /** Length of <b>signature</b> */
-  int signature_len;
-  unsigned int bad_signature : 1; /**< Set to true if we've tried to verify
-                                   * the sig, and we know it's bad. */
-  unsigned int good_signature : 1; /**< Set to true if we've verified the sig
-                                     * as good. */
-} document_signature_t;
+typedef struct document_signature_t document_signature_t;
 
 /** Information about a single voter in a vote or a consensus. */
 typedef struct networkstatus_voter_info_t {
index 4d02c42a4a311d71578a8f3176a94b12a8b17a2f..68def1c85e21fb100f61f56dd5fb2defcb4c8392 100644 (file)
 
 #include "dir_connection_st.h"
 #include "dir_server_st.h"
+#include "document_signature_st.h"
 #include "node_st.h"
 #include "vote_routerstatus_st.h"
 
index b7d50a1da11139914de66f845e14e9a9d2c9ea4c..2ae005569ce52e019e5fb5a8f3769349cbf88d78 100644 (file)
@@ -81,6 +81,7 @@
 
 #include "dirauth/dirvote.h"
 
+#include "document_signature_st.h"
 #include "rend_authorized_client_st.h"
 #include "rend_intro_point_st.h"
 #include "rend_service_descriptor_st.h"
index 963d97a325fe970d8b6bedc0df2288fcd03a1f1a..c3d00a81f90a9b3ff420b7a0174e5bf9635c9e31 100644 (file)
@@ -45,6 +45,7 @@
 #include "log_test_helpers.h"
 #include "voting_schedule.h"
 
+#include "document_signature_st.h"
 #include "port_cfg_st.h"
 #include "tor_version_st.h"
 #include "vote_microdesc_hash_st.h"