Commit 104c2e9e authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

Merge branch 'split_or_h'

parents bcc1368c 3edc48c0
Loading
Loading
Loading
Loading

changes/split_or_h

0 → 100644
+5 −0
Original line number Diff line number Diff line
  o Code simplification and refactoring:
    - Many structures have been removed from the centralized "or.h" header,
      and moved into their own headers.  This will allow us to reduce
      the number of places in the code that rely on each structure's
      contents and layout. Closes ticket 26383.
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@
#include "nodelist.h"
#include "routerset.h"

#include "entry_connection_st.h"

/** A client-side struct to remember requests to rewrite addresses
 * to new addresses. These structs are stored in the hash table
 * "addressmap" below.
+32 −0
Original line number Diff line number Diff line
/* 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 AUTHORITY_CERT_ST_H
#define AUTHORITY_CERT_ST_H

#include "signed_descriptor_st.h"

/** Certificate for v3 directory protocol: binds long-term authority identity
 * keys to medium-term authority signing keys. */
struct authority_cert_t {
  /** Information relating to caching this cert on disk and looking it up. */
  signed_descriptor_t cache_info;
  /** This authority's long-term authority identity key. */
  crypto_pk_t *identity_key;
  /** This authority's medium-term signing key. */
  crypto_pk_t *signing_key;
  /** The digest of <b>signing_key</b> */
  char signing_key_digest[DIGEST_LEN];
  /** The listed expiration time of this certificate. */
  time_t expires;
  /** This authority's IPv4 address, in host order. */
  uint32_t addr;
  /** This authority's directory port. */
  uint16_t dir_port;
};

#endif
+5 −0
Original line number Diff line number Diff line
@@ -27,6 +27,11 @@
#include "routerset.h"
#include "transports.h"

#include "extend_info_st.h"
#include "node_st.h"
#include "routerinfo_st.h"
#include "routerstatus_st.h"

/** Information about a configured bridge. Currently this just matches the
 * ones in the torrc file, but one day we may be able to learn about new
 * bridges on our own, and remember them in the state file. */

src/or/cached_dir_st.h

0 → 100644
+25 −0
Original line number Diff line number Diff line
/* 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 CACHED_DIR_ST_H
#define CACHED_DIR_ST_H

/** A cached_dir_t represents a cacheable directory object, along with its
 * compressed form. */
struct cached_dir_t {
  char *dir; /**< Contents of this object, NUL-terminated. */
  char *dir_compressed; /**< Compressed contents of this object. */
  size_t dir_len; /**< Length of <b>dir</b> (not counting its NUL). */
  size_t dir_compressed_len; /**< Length of <b>dir_compressed</b>. */
  time_t published; /**< When was this object published. */
  common_digests_t digests; /**< Digests of this object (networkstatus only) */
  /** Sha3 digest (also ns only) */
  uint8_t digest_sha3_as_signed[DIGEST256_LEN];
  int refcnt; /**< Reference count for this cached_dir_t. */
};

#endif
Loading