diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-15 14:21:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-15 14:21:25 -0400 |
commit | 00f1d1653e4ff703cfbcf82060b229ca8a39030d (patch) | |
tree | 1f53a2395b9f832d05893b86f651f40db33bc525 /src/or/extrainfo_st.h | |
parent | 1e4e9db8157e8691327fe9ee9de5df6fe9891040 (diff) | |
download | tor-00f1d1653e4ff703cfbcf82060b229ca8a39030d.tar.gz tor-00f1d1653e4ff703cfbcf82060b229ca8a39030d.zip |
Extract extrainfo_t into its own header
Diffstat (limited to 'src/or/extrainfo_st.h')
-rw-r--r-- | src/or/extrainfo_st.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/or/extrainfo_st.h b/src/or/extrainfo_st.h new file mode 100644 index 0000000000..d653978490 --- /dev/null +++ b/src/or/extrainfo_st.h @@ -0,0 +1,28 @@ +/* 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 EXTRAINFO_ST_H +#define EXTRAINFO_ST_H + +/** Information needed to keep and cache a signed extra-info document. */ +struct extrainfo_t { + signed_descriptor_t cache_info; + /** SHA256 digest of this document */ + uint8_t digest256[DIGEST256_LEN]; + /** The router's nickname. */ + char nickname[MAX_NICKNAME_LEN+1]; + /** True iff we found the right key for this extra-info, verified the + * signature, and found it to be bad. */ + unsigned int bad_sig : 1; + /** If present, we didn't have the right key to verify this extra-info, + * so this is a copy of the signature in the document. */ + char *pending_sig; + /** Length of pending_sig. */ + size_t pending_sig_len; +}; + +#endif + |