diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/authority_cert_st.h | 30 | ||||
-rw-r--r-- | src/or/dirauth/dirvote.c | 1 | ||||
-rw-r--r-- | src/or/dirauth/shared_random.c | 1 | ||||
-rw-r--r-- | src/or/directory.c | 1 | ||||
-rw-r--r-- | src/or/include.am | 1 | ||||
-rw-r--r-- | src/or/networkstatus.c | 1 | ||||
-rw-r--r-- | src/or/or.h | 19 | ||||
-rw-r--r-- | src/or/router.c | 1 | ||||
-rw-r--r-- | src/or/routerlist.c | 1 | ||||
-rw-r--r-- | src/or/routerparse.c | 1 | ||||
-rw-r--r-- | src/test/test_dir.c | 1 | ||||
-rw-r--r-- | src/test/test_dir_common.c | 1 | ||||
-rw-r--r-- | src/test/test_routerlist.c | 1 |
13 files changed, 42 insertions, 18 deletions
diff --git a/src/or/authority_cert_st.h b/src/or/authority_cert_st.h new file mode 100644 index 0000000000..b1dbcddbef --- /dev/null +++ b/src/or/authority_cert_st.h @@ -0,0 +1,30 @@ +/* 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 AUTHORITY_CERT_ST_H +#define AUTHORITY_CERT_ST_H + +/** Certificate for v3 directory protocol: binds long-term authority identity + * keys to medium-term authority signing keys. */ +struct authority_cert_t { + /** Information relating to caching this cert on disk and looking it up. */ + signed_descriptor_t cache_info; + /** This authority's long-term authority identity key. */ + crypto_pk_t *identity_key; + /** This authority's medium-term signing key. */ + crypto_pk_t *signing_key; + /** The digest of <b>signing_key</b> */ + char signing_key_digest[DIGEST_LEN]; + /** The listed expiration time of this certificate. */ + time_t expires; + /** This authority's IPv4 address, in host order. */ + uint32_t addr; + /** This authority's directory port. */ + uint16_t dir_port; +}; + +#endif + diff --git a/src/or/dirauth/dirvote.c b/src/or/dirauth/dirvote.c index 1f95b985c0..29134868c8 100644 --- a/src/or/dirauth/dirvote.c +++ b/src/or/dirauth/dirvote.c @@ -28,6 +28,7 @@ #include "dirauth/mode.h" #include "dirauth/shared_random_state.h" +#include "authority_cert_st.h" #include "dir_server_st.h" #include "document_signature_st.h" #include "networkstatus_st.h" diff --git a/src/or/dirauth/shared_random.c b/src/or/dirauth/shared_random.c index 137f695dbe..c042acda1b 100644 --- a/src/or/dirauth/shared_random.c +++ b/src/or/dirauth/shared_random.c @@ -105,6 +105,7 @@ #include "dirauth/dirvote.h" #include "dirauth/mode.h" +#include "authority_cert_st.h" #include "networkstatus_st.h" /* String prefix of shared random values in votes/consensuses. */ diff --git a/src/or/directory.c b/src/or/directory.c index b5a07f6b3e..f3080bc1f1 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -54,6 +54,7 @@ #include "dirauth/mode.h" #include "dirauth/shared_random.h" +#include "authority_cert_st.h" #include "dir_connection_st.h" #include "dir_server_st.h" #include "entry_connection_st.h" diff --git a/src/or/include.am b/src/or/include.am index 396cfea5ab..e73432d3cf 100644 --- a/src/or/include.am +++ b/src/or/include.am @@ -181,6 +181,7 @@ endif ORHEADERS = \ src/or/addressmap.h \ + src/or/authority_cert_st.h \ src/or/auth_dirs.inc \ src/or/bridges.h \ src/or/channel.h \ diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 6f7223b60a..1951414a8a 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -74,6 +74,7 @@ #include "dirauth/mode.h" #include "dirauth/shared_random.h" +#include "authority_cert_st.h" #include "dir_connection_st.h" #include "dir_server_st.h" #include "document_signature_st.h" diff --git a/src/or/or.h b/src/or/or.h index a8ddcd2406..1f7c4be507 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1911,24 +1911,7 @@ typedef struct extend_info_t { curve25519_public_key_t curve25519_onion_key; } extend_info_t; -/** Certificate for v3 directory protocol: binds long-term authority identity - * keys to medium-term authority signing keys. */ -typedef struct authority_cert_t { - /** Information relating to caching this cert on disk and looking it up. */ - signed_descriptor_t cache_info; - /** This authority's long-term authority identity key. */ - crypto_pk_t *identity_key; - /** This authority's medium-term signing key. */ - crypto_pk_t *signing_key; - /** The digest of <b>signing_key</b> */ - char signing_key_digest[DIGEST_LEN]; - /** The listed expiration time of this certificate. */ - time_t expires; - /** This authority's IPv4 address, in host order. */ - uint32_t addr; - /** This authority's directory port. */ - uint16_t dir_port; -} authority_cert_t; +typedef struct authority_cert_t authority_cert_t; /** Bitfield enum type listing types of information that directory authorities * can be authoritative about, and that directory caches may or may not cache. diff --git a/src/or/router.c b/src/or/router.c index 6d8f61d716..961fab1290 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -39,6 +39,7 @@ #include "dirauth/mode.h" +#include "authority_cert_st.h" #include "crypt_path_st.h" #include "dir_connection_st.h" #include "dir_server_st.h" diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 102f3125a4..3170ce6017 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -125,6 +125,7 @@ #include "dirauth/dirvote.h" #include "dirauth/mode.h" +#include "authority_cert_st.h" #include "dir_connection_st.h" #include "dir_server_st.h" #include "document_signature_st.h" diff --git a/src/or/routerparse.c b/src/or/routerparse.c index ea1320de78..34c851a1b5 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -81,6 +81,7 @@ #include "dirauth/dirvote.h" +#include "authority_cert_st.h" #include "document_signature_st.h" #include "networkstatus_st.h" #include "networkstatus_voter_info_st.h" diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 9412f879dd..ecce489423 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -45,6 +45,7 @@ #include "log_test_helpers.h" #include "voting_schedule.h" +#include "authority_cert_st.h" #include "document_signature_st.h" #include "networkstatus_st.h" #include "networkstatus_voter_info_st.h" diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c index 3fad1c3af0..c23282ba85 100644 --- a/src/test/test_dir_common.c +++ b/src/test/test_dir_common.c @@ -14,6 +14,7 @@ #include "test_dir_common.h" #include "voting_schedule.h" +#include "authority_cert_st.h" #include "networkstatus_st.h" #include "networkstatus_voter_info_st.h" #include "vote_microdesc_hash_st.h" diff --git a/src/test/test_routerlist.c b/src/test/test_routerlist.c index 45d63a8061..1c2ba9d673 100644 --- a/src/test/test_routerlist.c +++ b/src/test/test_routerlist.c @@ -34,6 +34,7 @@ #include "dirauth/shared_random.h" #include "statefile.h" +#include "authority_cert_st.h" #include "dir_connection_st.h" #include "networkstatus_st.h" #include "node_st.h" |