tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

extrainfo_st.h (1090B)


      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 
     15 #include "feature/nodelist/signed_descriptor_st.h"
     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 */
     21  uint8_t digest256[DIGEST256_LEN];
     22  /** The router's nickname. */
     23  char nickname[MAX_NICKNAME_LEN+1];
     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. */
     31  size_t pending_sig_len;
     32 };
     33 
     34 #endif /* !defined(EXTRAINFO_ST_H) */