Tor  0.4.7.0-alpha-dev
signed_descriptor_st.h
Go to the documentation of this file.
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2021, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * @file signed_descriptor_st.h
9  * @brief Descriptor/extrainfo signature structure
10  **/
11 
12 #ifndef SIGNED_DESCRIPTOR_ST_H
13 #define SIGNED_DESCRIPTOR_ST_H
14 
16 
17 /** Information need to cache an onion router's descriptor. */
19  /** Pointer to the raw server descriptor, preceded by annotations. Not
20  * necessarily NUL-terminated. If saved_location is SAVED_IN_CACHE, this
21  * pointer is null. */
23  /** Length of the annotations preceding the server descriptor. */
25  /** Length of the server descriptor. */
27  /** Digest of the server descriptor, computed as specified in
28  * dir-spec.txt. */
30  /** Identity digest of the router. */
32  /** Declared publication time of the descriptor. */
33  time_t published_on;
34  /** For routerdescs only: digest of the corresponding extrainfo. */
36  /** For routerdescs only: A SHA256-digest of the extrainfo (if any) */
38  /** Certificate for ed25519 signing key. */
39  struct tor_cert_st *signing_key_cert;
40  /** For routerdescs only: Status of downloading the corresponding
41  * extrainfo. */
43  /** Where is the descriptor saved? */
45  /** If saved_location is SAVED_IN_CACHE or SAVED_IN_JOURNAL, the offset of
46  * this descriptor in the corresponding file. */
47  off_t saved_offset;
48  /** What position is this descriptor within routerlist->routers or
49  * routerlist->old_routers? -1 for none. */
51  /** The valid-until time of the most recent consensus that listed this
52  * descriptor. 0 for "never listed in a consensus, so far as we know." */
54  /* If true, we do not ever try to save this object in the cache. */
55  unsigned int do_not_cache : 1;
56  /* If true, this item is meant to represent an extrainfo. */
57  unsigned int is_extrainfo : 1;
58  /* If true, we got an extrainfo for this item, and the digest was right,
59  * but it was incompatible. */
60  unsigned int extrainfo_is_bogus : 1;
61  /* If true, we are willing to transmit this item unencrypted. */
62  unsigned int send_unencrypted : 1;
63 };
64 
65 #endif /* !defined(SIGNED_DESCRIPTOR_ST_H) */
#define DIGEST_LEN
Definition: digest_sizes.h:20
#define DIGEST256_LEN
Definition: digest_sizes.h:23
Directory download status/schedule structure.
saved_location_t
Definition: or.h:627
char signed_descriptor_digest[DIGEST_LEN]
char extra_info_digest[DIGEST_LEN]
char identity_digest[DIGEST_LEN]
download_status_t ei_dl_status
struct tor_cert_st * signing_key_cert
char extra_info_digest256[DIGEST256_LEN]
saved_location_t saved_location