Tor  0.4.7.0-alpha-dev
extrainfo_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 extrainfo_st.h
9  * @brief A relay's extra-info structure.
10  **/
11 
12 #ifndef EXTRAINFO_ST_H
13 #define EXTRAINFO_ST_H
14 
16 
17 /** Information needed to keep and cache a signed extra-info document. */
18 struct extrainfo_t {
19  signed_descriptor_t cache_info;
20  /** SHA256 digest of this document */
22  /** The router's nickname. */
24  /** True iff we found the right key for this extra-info, verified the
25  * signature, and found it to be bad. */
26  unsigned int bad_sig : 1;
27  /** If present, we didn't have the right key to verify this extra-info,
28  * so this is a copy of the signature in the document. */
29  char *pending_sig;
30  /** Length of pending_sig. */
32 };
33 
34 #endif /* !defined(EXTRAINFO_ST_H) */
#define DIGEST256_LEN
Definition: digest_sizes.h:23
#define MAX_NICKNAME_LEN
Definition: or.h:112
Descriptor/extrainfo signature structure.
char * pending_sig
Definition: extrainfo_st.h:29
unsigned int bad_sig
Definition: extrainfo_st.h:26
uint8_t digest256[DIGEST256_LEN]
Definition: extrainfo_st.h:21
char nickname[MAX_NICKNAME_LEN+1]
Definition: extrainfo_st.h:23
size_t pending_sig_len
Definition: extrainfo_st.h:31