extrainfo_st.h 984 B

123456789101112131415161718192021222324252627282930
  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-2018, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef EXTRAINFO_ST_H
  7. #define EXTRAINFO_ST_H
  8. #include "feature/nodelist/signed_descriptor_st.h"
  9. /** Information needed to keep and cache a signed extra-info document. */
  10. struct extrainfo_t {
  11. signed_descriptor_t cache_info;
  12. /** SHA256 digest of this document */
  13. uint8_t digest256[DIGEST256_LEN];
  14. /** The router's nickname. */
  15. char nickname[MAX_NICKNAME_LEN+1];
  16. /** True iff we found the right key for this extra-info, verified the
  17. * signature, and found it to be bad. */
  18. unsigned int bad_sig : 1;
  19. /** If present, we didn't have the right key to verify this extra-info,
  20. * so this is a copy of the signature in the document. */
  21. char *pending_sig;
  22. /** Length of pending_sig. */
  23. size_t pending_sig_len;
  24. };
  25. #endif