* GZIP_METHOD is guaranteed to be supported by the compress/uncompress
* functions here. Call tor_compress_supports_method() to check if a given
* compression schema is supported by Tor. */
-typedef enum {
+typedef enum compress_method_t {
NO_METHOD=0, // This method must be first.
GZIP_METHOD=1,
ZLIB_METHOD=2,
* BEST_COMPRESSION saves the most bandwidth; LOW_COMPRESSION saves the most
* memory.
**/
-typedef enum {
+typedef enum compression_level_t {
BEST_COMPRESSION, HIGH_COMPRESSION, MEDIUM_COMPRESSION, LOW_COMPRESSION
} compression_level_t;
#define TOR_CRYPTO_DH_H
#include "orconfig.h"
+#include "lib/cc/torint.h"
#include "lib/defs/dh_sizes.h"
typedef struct crypto_dh_t crypto_dh_t;
#define ADDRESSMAP_PRIVATE
+#include "lib/crypt_ops/crypto_rand.h"
+
#include "or/or.h"
#include "or/addressmap.h"
#include "or/circuituse.h"
#include "or/config.h"
#include "or/connection_edge.h"
#include "or/control.h"
-#include "lib/crypt_ops/crypto_rand.h"
#include "or/dns.h"
#include "or/nodelist.h"
#include "or/routerset.h"
iter = strmap_iter_next(addressmap,iter);
}
}
-
#ifndef PACKED_CELL_ST_H
#define PACKED_CELL_ST_H
+#include "tor_queue.h"
+
/** A cell as packed for writing to the network. */
struct packed_cell_t {
/** Next cell queued on this circuit. */
};
#endif
-
#include "common/timers.h"
#include "common/handles.h"
+#include "tor_queue.h"
+
/* Channel handler function pointer typedefs */
typedef void (*channel_listener_fn_ptr)(channel_listener_t *, channel_t *);
typedef void (*channel_cell_handler_fn_ptr)(channel_t *, cell_t *);
FREE_AND_NULL(channel_handle_t, channel_handle_free_, (h))
#endif /* !defined(TOR_CHANNEL_H) */
-
#include "or/routerinfo_st.h"
#include "or/var_cell_st.h"
+#include "lib/tls/tortls.h"
+
/** How many CELL_PADDING cells have we received, ever? */
uint64_t stats_n_padding_cells_processed = 0;
/** How many CELL_VERSIONS cells have we received, ever? */
#undef ERR
}
-
#include "or/cell_queue_st.h"
+struct hs_token_t;
+
/**
* A circuit is a path over the onion routing
* network. Applications can connect to one end of the circuit, and can
/** If set, points to an HS token that this circuit might be carrying.
* Used by the HS circuitmap. */
- hs_token_t *hs_token;
+ struct hs_token_t *hs_token;
/** Hashtable node: used to look up the circuit by its HS token using the HS
circuitmap. */
HT_ENTRY(circuit_t) hs_circuitmap_node;
};
#endif
-
#include "or/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
+#include "lib/crypt_ops/crypto_dh.h"
#include "or/directory.h"
#include "or/entrynodes.h"
#include "or/main.h"
#include "or/routerlist.h"
#include "or/routerset.h"
#include "or/channelpadding.h"
+#include "lib/compress/compress.h"
#include "lib/compress/compress_lzma.h"
#include "lib/compress/compress_zlib.h"
#include "lib/compress/compress_zstd.h"
tor_assert(!or_circ || !or_circ->rend_splice);
}
}
-
#include "or/circuituse.h"
#include "lib/math/fp.h"
#include "lib/time/tvdiff.h"
+#include "lib/encoding/confline.h"
#include "or/crypt_path_st.h"
#include "or/origin_circuit_st.h"
#include "or/circuitstats.h"
#include "lib/compress/compress.h"
#include "or/config.h"
+#include "lib/encoding/confline.h"
#include "or/connection.h"
#include "or/connection_edge.h"
#include "or/connection_or.h"
int get_protocol_warning_severity_level(void);
const char *get_version(void);
const char *get_short_version(void);
-setopt_err_t options_trial_assign(config_line_t *list, unsigned flags,
+setopt_err_t options_trial_assign(struct config_line_t *list, unsigned flags,
char **msg);
uint32_t get_last_resolved_addr(void);
int command, const char *command_arg, char **msg);
int option_is_recognized(const char *key);
const char *option_get_canonical_name(const char *key);
-config_line_t *option_get_assignment(const or_options_t *options,
+struct config_line_t *option_get_assignment(const or_options_t *options,
const char *key);
int options_save_current(void);
const char *get_torrc_fname(int defaults_fname);
or_options_t *options_new(void);
int config_parse_commandline(int argc, char **argv, int ignore_errors,
- config_line_t **result,
- config_line_t **cmdline_result);
+ struct config_line_t **result,
+ struct config_line_t **cmdline_result);
void config_register_addressmaps(const or_options_t *options);
/* XXXX move to connection_edge.h */
STATIC int have_enough_mem_for_dircache(const or_options_t *options,
size_t total_mem, char **msg);
STATIC int parse_port_config(smartlist_t *out,
- const config_line_t *ports,
+ const struct config_line_t *ports,
const char *portname,
int listener_type,
const char *defaultaddr,
#include "or/routerset.h"
#include "lib/container/bitarray.h"
+#include "lib/encoding/confline.h"
static uint64_t config_parse_memunit(const char *s, int *ok);
static int config_parse_msec_interval(const char *s, int *ok);
time_t *ISOTIME;
smartlist_t **CSV;
int *CSV_INTERVAL;
- config_line_t **LINELIST;
- config_line_t **LINELIST_S;
- config_line_t **LINELIST_V;
+ struct config_line_t **LINELIST;
+ struct config_line_t **LINELIST_S;
+ struct config_line_t **LINELIST_V;
routerset_t **ROUTERSET;
} confparse_dummy_values_t;
#endif /* defined(TOR_UNIT_TESTS) */
(options) = NULL; \
} while (0)
-config_line_t *config_get_assigned_option(const config_format_t *fmt,
+struct config_line_t *config_get_assigned_option(const config_format_t *fmt,
const void *options, const char *key,
int escape_val);
int config_is_same(const config_format_t *fmt,
const void *options, int minimal,
int comment_defaults);
int config_assign(const config_format_t *fmt, void *options,
- config_line_t *list,
+ struct config_line_t *list,
unsigned flags, char **msg);
config_var_t *config_find_option_mutable(config_format_t *fmt,
const char *key);
#define CFG_EQ_ROUTERSET(a,b,opt) routerset_equal((a)->opt, (b)->opt)
#endif /* !defined(TOR_CONFPARSE_H) */
-
#include "or/routerparse.h"
#include "lib/sandbox/sandbox.h"
#include "lib/net/buffers_net.h"
+#include "lib/tls/tortls.h"
+#include "common/compat_libevent.h"
+#include "lib/compress/compress.h"
#ifdef HAVE_PWD_H
#include <pwd.h>
#include "or/or_circuit_st.h"
#include "or/origin_circuit_st.h"
#include "or/socks_request_st.h"
+#include "common/compat_libevent.h"
#ifdef HAVE_LINUX_TYPES_H
#include <linux/types.h>
pending_entry_connections = NULL;
mainloop_event_free(attach_pending_entry_connections_ev);
}
-
#include "or/routerinfo_st.h"
#include "or/var_cell_st.h"
+#include "lib/tls/tortls.h"
+
static int connection_tls_finish_handshake(or_connection_t *conn);
static int connection_or_launch_v3_or_handshake(or_connection_t *conn);
static int connection_or_process_cells_from_inbuf(or_connection_t *conn);
return 0;
}
-
#include "or/conscache.h"
#include "lib/crypt_ops/crypto_util.h"
#include "lib/fs/storagedir.h"
+#include "lib/encoding/confline.h"
#define CCE_MAGIC 0x17162253
}
}
#endif /* defined(TOR_UNIT_TESTS) */
-
int force);
int consensus_cache_get_n_filenames_available(consensus_cache_t *cache);
consensus_cache_entry_t *consensus_cache_add(consensus_cache_t *cache,
- const config_line_t *labels,
- const uint8_t *data,
- size_t datalen);
+ const struct config_line_t *labels,
+ const uint8_t *data,
+ size_t datalen);
consensus_cache_entry_t *consensus_cache_find_first(
consensus_cache_t *cache,
const char *consensus_cache_entry_get_value(const consensus_cache_entry_t *ent,
const char *key);
-const config_line_t *consensus_cache_entry_get_labels(
+const struct config_line_t *consensus_cache_entry_get_labels(
const consensus_cache_entry_t *ent);
void consensus_cache_entry_incref(consensus_cache_entry_t *ent);
#endif
#endif /* !defined(TOR_CONSCACHE_H) */
-
#include "or/cpuworker.h"
#include "or/networkstatus.h"
#include "or/routerparse.h"
+#include "common/compat_libevent.h"
#include "common/workqueue.h"
+#include "lib/compress/compress.h"
+#include "lib/encoding/confline.h"
#include "or/networkstatus_st.h"
#include "or/networkstatus_voter_info_st.h"
else
return 0;
}
-
#ifndef TOR_CONSDIFFMGR_H
#define TOR_CONSDIFFMGR_H
+enum compress_method_t;
+
/**
* Possible outcomes from trying to look up a given consensus diff.
*/
consdiff_status_t consdiffmgr_find_consensus(
struct consensus_cache_entry_t **entry_out,
consensus_flavor_t flavor,
- compress_method_t method);
+ enum compress_method_t method);
consdiff_status_t consdiffmgr_find_diff_from(
struct consensus_cache_entry_t **entry_out,
int digest_type,
const uint8_t *digest,
size_t digestlen,
- compress_method_t method);
+ enum compress_method_t method);
int consensus_cache_entry_get_voter_id_digests(
const struct consensus_cache_entry_t *ent,
#endif /* defined(CONSDIFFMGR_PRIVATE) */
#endif /* !defined(TOR_CONSDIFFMGR_H) */
-
#include "or/routerlist.h"
#include "or/routerparse.h"
#include "or/shared_random_client.h"
+#include "lib/encoding/confline.h"
#include "or/cached_dir_st.h"
#include "or/control_connection_st.h"
#include "lib/crypt_ops/crypto_s2k.h"
#include "common/procmon.h"
+#include "common/compat_libevent.h"
/** Yield true iff <b>s</b> is the state of a control_connection_t that has
* finished authentication and is accepting commands. */
global_event_mask = mask;
}
#endif /* defined(TOR_UNIT_TESTS) */
-
int init_control_cookie_authentication(int enabled);
char *get_controller_cookie_file_name(void);
-smartlist_t *decode_hashed_passwords(config_line_t *passwords);
+smartlist_t *decode_hashed_passwords(struct config_line_t *passwords);
void disable_control_logging(void);
void enable_control_logging(void);
#endif /* defined(CONTROL_PRIVATE) */
#endif /* !defined(TOR_CONTROL_H) */
-
#define CRYPT_PATH_ST_H
#include "or/relay_crypto_st.h"
+struct crypto_dh_t;
/** Holds accounting information for a single step in the layered encryption
* performed by a circuit. Used only at the client edge of a circuit. */
onion_handshake_state_t handshake_state;
/** Diffie-hellman handshake state for performing an introduction
* operations */
- crypto_dh_t *rend_dh_handshake_state;
+ struct crypto_dh_t *rend_dh_handshake_state;
/** Negotiated key material shared with the OR at this step. */
char rend_circ_nonce[DIGEST_LEN];/* KH in tor-spec.txt */
};
#endif
-
#include "or/connection_st.h"
+struct tor_compress_state_t;
+
/** Subtype of connection_t for an "directory connection" -- that is, an HTTP
* connection to retrieve or serve directory material. */
struct dir_connection_t {
* it from back to front. */
smartlist_t *spool;
/** The compression object doing on-the-fly compression for spooled data. */
- tor_compress_state_t *compress_state;
+ struct tor_compress_state_t *compress_state;
/** What rendezvous service are we querying for? */
rend_data_t *rend_data;
};
#endif
-
#include "or/vote_timing_st.h"
#include "lib/container/order.h"
+#include "lib/encoding/confline.h"
/**
* \file dirvote.c
#include "or/shared_random_client.h"
#include "or/dirauth/shared_random_state.h"
#include "or/voting_schedule.h"
+#include "lib/encoding/confline.h"
/* Default filename of the shared random state on disk. */
static const char default_fname[] = "sr-state";
}
#endif /* defined(TOR_UNIT_TESTS) */
-
/* State valid until? */
time_t ValidUntil;
/* All commits seen that are valid. */
- config_line_t *Commit;
+ struct config_line_t *Commit;
/* Previous and current shared random value. */
- config_line_t *SharedRandValues;
+ struct config_line_t *SharedRandValues;
/* Extra Lines for configuration we might not know. */
- config_line_t *ExtraLines;
+ struct config_line_t *ExtraLines;
} sr_disk_state_t;
/* API */
#endif /* defined(TOR_UNIT_TESTS) */
#endif /* !defined(TOR_SHARED_RANDOM_STATE_H) */
-
#include "or/consdiff.h"
#include "or/consdiffmgr.h"
#include "or/control.h"
+#include "lib/compress/compress.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "or/directory.h"
#include "or/routerlist.h"
#include "or/routerparse.h"
#include "or/routerset.h"
+#include "lib/encoding/confline.h"
#if defined(EXPORTMALLINFO) && defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
#if !defined(OpenBSD)
smartlist_free(fingerprints);
return r;
}
-
#define TOR_DIRECTORY_H
#include "or/hs_ident.h"
+enum compress_method_t;
dir_connection_t *TO_DIR_CONN(connection_t *c);
int directories_have_accepted_server_descriptor(void);
MOCK_DECL(void, directory_initiate_request, (directory_request_t *request));
int parse_http_response(const char *headers, int *code, time_t *date,
- compress_method_t *compression, char **response);
+ enum compress_method_t *compression, char **response);
int parse_http_command(const char *headers,
char **command_out, char **url_out);
char *http_get_header(const char *headers, const char *which);
/** Hidden-service-specific information v2. */
const rend_data_t *rend_query;
/** Extra headers to append to the request */
- config_line_t *additional_headers;
+ struct config_line_t *additional_headers;
/** Hidden-service-specific information for v3+. */
const hs_ident_dir_conn_t *hs_ident;
/** Used internally to directory.c: gets informed when the attempt to
const struct get_handler_args_t *args);
STATIC int directory_handle_command(dir_connection_t *conn);
STATIC char *accept_encoding_header(void);
-STATIC int allowed_anonymous_connection_compression_method(compress_method_t);
-STATIC void warn_disallowed_anonymous_compression_method(compress_method_t);
+STATIC int allowed_anonymous_connection_compression_method(
+ enum compress_method_t);
+STATIC void warn_disallowed_anonymous_compression_method(
+ enum compress_method_t);
STATIC int handle_response_fetch_hsdesc_v3(dir_connection_t *conn,
const response_handler_args_t *args);
STATIC char* authdir_type_to_string(dirinfo_type_t auth);
STATIC const char * dir_conn_purpose_to_string(int purpose);
STATIC int should_use_directory_guards(const or_options_t *options);
-STATIC compression_level_t choose_compression_level(ssize_t n_bytes);
+enum compression_level_t;
+STATIC enum compression_level_t choose_compression_level(ssize_t n_bytes);
STATIC int find_dl_min_delay(const download_status_t *dls,
const or_options_t *options);
#endif /* defined(TOR_UNIT_TESTS) || defined(DIRECTORY_PRIVATE) */
#endif /* !defined(TOR_DIRECTORY_H) */
-
#include "or/tor_version_st.h"
#include "or/vote_routerstatus_st.h"
+#include "lib/compress/compress.h"
#include "lib/container/order.h"
+#include "lib/encoding/confline.h"
/**
* \file dirserv.c
#include "or/router.h"
#include "ht.h"
#include "lib/sandbox/sandbox.h"
+#include "common/compat_libevent.h"
#include "or/edge_connection_st.h"
#include "or/or_circuit_st.h"
{
HT_INSERT(cache_map, &cache_root, new_entry);
}
-
#include "or/entry_connection_st.h"
#include "or/listener_connection_st.h"
#include "or/socks_request_st.h"
+#include "common/compat_libevent.h"
#include <event2/dns.h>
#include <event2/dns_compat.h>
listener_conn->dns_server_port = NULL;
}
}
-
#include "or/transports.h"
#include "or/statefile.h"
#include "lib/math/fp.h"
+#include "lib/encoding/confline.h"
#include "or/node_st.h"
#include "or/origin_circuit_st.h"
#include "or/main.h"
#include "or/router.h"
#include "or/statefile.h"
+#include "common/compat_libevent.h"
#include "or/or_connection_st.h"
hibernate_state = newstate;
}
#endif /* defined(TOR_UNIT_TESTS) */
-
#include "or/router.h"
#include "or/hs_cell.h"
+#include "or/hs_circuitmap.h"
#include "or/hs_ident.h"
#include "or/hs_ntor.h"
#include "or/hs_service.h"
tor_free(the_hs_circuitmap);
}
}
-
typedef HT_HEAD(hs_circuitmap_ht, circuit_t) hs_circuitmap_ht;
-typedef struct hs_token_s hs_token_t;
+typedef struct hs_token_t hs_token_t;
struct or_circuit_t;
struct origin_circuit_t;
/** Represents a token used in the HS protocol. Each such token maps to a
* specific introduction or rendezvous circuit. */
-struct hs_token_s {
+struct hs_token_t {
/* Type of HS token. */
hs_token_type_t type;
#endif /* TOR_UNIT_TESTS */
#endif /* !defined(TOR_HS_CIRCUITMAP_H) */
-
#include "or/hs_cache.h"
#include "or/hs_cell.h"
#include "or/hs_circuit.h"
+#include "or/hs_circuitmap.h"
#include "or/hs_client.h"
#include "or/hs_control.h"
#include "or/hs_descriptor.h"
* AP_CONN_STATE_RENDDESC_WAIT state in order to fetch the descriptor. */
retry_all_socks_conn_waiting_for_desc();
}
-
#include "or/hs_config.h"
#include "or/hs_service.h"
#include "or/rendservice.h"
+#include "lib/encoding/confline.h"
/* Using the given list of services, stage them into our global state. Every
* service version are handled. This function can remove entries in the given
/* Tor main should call the free all function on error. */
return ret;
}
-
#include "or/origin_circuit_st.h"
#include "or/routerstatus_st.h"
+#include "lib/encoding/confline.h"
+
/* Trunnel */
#include "trunnel/ed25519_cert.h"
#include "trunnel/hs/cell_common.h"
}
#endif /* defined(TOR_UNIT_TESTS) */
-
#include "lib/sandbox/sandbox.h"
#include "lib/fs/lockfile.h"
#include "lib/net/buffers_net.h"
+#include "lib/tls/tortls.h"
+#include "common/compat_libevent.h"
+#include "lib/encoding/confline.h"
#include <event2/event.h>
void periodic_events_on_new_options(const or_options_t *options);
void reschedule_per_second_timer(void);
+struct token_bucket_rw_t;
+
extern time_t time_of_process_start;
extern int quiet_level;
-extern token_bucket_rw_t global_bucket;
-extern token_bucket_rw_t global_relayed_bucket;
+extern struct token_bucket_rw_t global_bucket;
+extern struct token_bucket_rw_t global_relayed_bucket;
#ifdef MAIN_PRIVATE
STATIC void init_connection_lists(void);
#endif /* defined(MAIN_PRIVATE) */
#endif /* !defined(TOR_MAIN_H) */
-
#include "or/ntmain.h"
#include "lib/log/win32err.h"
#include "lib/fs/winlib.h"
+#include "common/compat_libevent.h"
#include <windows.h>
#define GENSRV_SERVICENAME "tor"
#include "or/config.h"
#include "or/cpuworker.h"
#include "lib/crypt_ops/crypto_util.h"
+#include "lib/crypt_ops/crypto_dh.h"
#include "or/networkstatus.h"
#include "or/onion.h"
#include "or/onion_fast.h"
return 0;
}
-
#include "or/or.h"
#include "or/onion_fast.h"
+#include "lib/crypt_ops/crypto_hkdf.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
tor_free(out);
return r;
}
-
#include "or/or.h"
#include "or/config.h"
+#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "or/onion_tap.h"
tor_free(key_material);
return -1;
}
-
DH1024_KEY_LEN)
#define TAP_ONIONSKIN_REPLY_LEN (DH1024_KEY_LEN+DIGEST_LEN)
-int onion_skin_TAP_create(crypto_pk_t *router_key,
- crypto_dh_t **handshake_state_out,
+struct crypto_dh_t;
+struct crypto_pk_t;
+
+int onion_skin_TAP_create(struct crypto_pk_t *router_key,
+ struct crypto_dh_t **handshake_state_out,
char *onion_skin_out);
int onion_skin_TAP_server_handshake(const char *onion_skin,
- crypto_pk_t *private_key,
- crypto_pk_t *prev_private_key,
+ struct crypto_pk_t *private_key,
+ struct crypto_pk_t *prev_private_key,
char *handshake_reply_out,
char *key_out,
size_t key_out_len);
-int onion_skin_TAP_client_handshake(crypto_dh_t *handshake_state,
+int onion_skin_TAP_client_handshake(struct crypto_dh_t *handshake_state,
const char *handshake_reply,
char *key_out,
size_t key_out_len,
const char **msg_out);
#endif /* !defined(TOR_ONION_TAP_H) */
-
#include <windows.h>
#endif /* defined(_WIN32) */
+#include "common/util.h"
+
+#include "lib/container/map.h"
+#include "lib/container/smartlist.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_format.h"
-#include "lib/crypt_ops/crypto_dh.h"
-#include "lib/crypt_ops/crypto_hkdf.h"
-#include "lib/tls/tortls.h"
-#include "lib/log/torlog.h"
-#include "lib/container/smartlist.h"
-#include "lib/container/map.h"
-#include "lib/compress/compress.h"
+#include "lib/defs/dh_sizes.h"
+#include "lib/encoding/binascii.h"
#include "lib/net/address.h"
-#include "common/compat_libevent.h"
+
#include "ht.h"
-#include "lib/encoding/confline.h"
-#include "or/replaycache.h"
-#include "lib/crypt_ops/crypto_curve25519.h"
-#include "lib/crypt_ops/crypto_ed25519.h"
-#include "tor_queue.h"
-#include "common/token_bucket.h"
-#include "lib/encoding/binascii.h"
-#include "or/hs_circuitmap.h"
-#include "common/util.h"
// These, more than other includes, are for keeping the other struct
// definitions working. We should remove them when we minimize our includes.
struct fast_handshake_state_t;
struct ntor_handshake_state_t;
+struct crypto_dh_t;
#define ONION_HANDSHAKE_TYPE_TAP 0x0000
#define ONION_HANDSHAKE_TYPE_FAST 0x0001
#define ONION_HANDSHAKE_TYPE_NTOR 0x0002
uint16_t tag;
union {
struct fast_handshake_state_t *fast;
- crypto_dh_t *tap;
+ struct crypto_dh_t *tap;
struct ntor_handshake_state_t *ntor;
} u;
} onion_handshake_state_t;
OUTBOUND_ADDR_EXIT_AND_OR,
OUTBOUND_ADDR_MAX} outbound_addr_t;
+struct config_line_t;
+
/** Configuration options for a Tor process. */
typedef struct {
uint32_t magic_;
} command;
char *command_arg; /**< Argument for command-line option. */
- config_line_t *Logs; /**< New-style list of configuration lines
+ struct config_line_t *Logs; /**< New-style list of configuration lines
* for logs */
int LogTimeGranularity; /**< Log resolution in milliseconds. */
int DisableAllSwap; /**< Boolean: Attempt to call mlockall() on our
* process for all current and future memory. */
- config_line_t *ExitPolicy; /**< Lists of exit policy components. */
+ struct config_line_t *ExitPolicy; /**< Lists of exit policy components. */
int ExitPolicyRejectPrivate; /**< Should we not exit to reserved private
* addresses, and our own published addresses?
*/
* Includes OutboundBindAddresses and
* configured ports. */
int ReducedExitPolicy; /**<Should we use the Reduced Exit Policy? */
- config_line_t *SocksPolicy; /**< Lists of socks policy components */
- config_line_t *DirPolicy; /**< Lists of dir policy components */
+ struct config_line_t *SocksPolicy; /**< Lists of socks policy components */
+ struct config_line_t *DirPolicy; /**< Lists of dir policy components */
/** Local address to bind outbound sockets */
- config_line_t *OutboundBindAddress;
+ struct config_line_t *OutboundBindAddress;
/** Local address to bind outbound relay sockets */
- config_line_t *OutboundBindAddressOR;
+ struct config_line_t *OutboundBindAddressOR;
/** Local address to bind outbound exit sockets */
- config_line_t *OutboundBindAddressExit;
+ struct config_line_t *OutboundBindAddressExit;
/** Addresses derived from the various OutboundBindAddress lines.
* [][0] is IPv4, [][1] is IPv6
*/
tor_addr_t OutboundBindAddresses[OUTBOUND_ADDR_MAX][2];
/** Directory server only: which versions of
* Tor should we tell users to run? */
- config_line_t *RecommendedVersions;
- config_line_t *RecommendedClientVersions;
- config_line_t *RecommendedServerVersions;
- config_line_t *RecommendedPackages;
+ struct config_line_t *RecommendedVersions;
+ struct config_line_t *RecommendedClientVersions;
+ struct config_line_t *RecommendedServerVersions;
+ struct config_line_t *RecommendedPackages;
/** Whether dirservers allow router descriptors with private IPs. */
int DirAllowPrivateAddresses;
/** Whether routers accept EXTEND cells to routers with private IPs. */
int ExtendAllowPrivateAddresses;
char *User; /**< Name of user to run Tor as. */
- config_line_t *ORPort_lines; /**< Ports to listen on for OR connections. */
+ /** Ports to listen on for OR connections. */
+ struct config_line_t *ORPort_lines;
/** Ports to listen on for extended OR connections. */
- config_line_t *ExtORPort_lines;
+ struct config_line_t *ExtORPort_lines;
/** Ports to listen on for SOCKS connections. */
- config_line_t *SocksPort_lines;
+ struct config_line_t *SocksPort_lines;
/** Ports to listen on for transparent pf/netfilter connections. */
- config_line_t *TransPort_lines;
+ struct config_line_t *TransPort_lines;
char *TransProxyType; /**< What kind of transparent proxy
* implementation are we using? */
/** Parsed value of TransProxyType. */
TPT_IPFW,
TPT_TPROXY,
} TransProxyType_parsed;
- config_line_t *NATDPort_lines; /**< Ports to listen on for transparent natd
- * connections. */
+ /** Ports to listen on for transparent natd connections. */
+ struct config_line_t *NATDPort_lines;
/** Ports to listen on for HTTP Tunnel connections. */
- config_line_t *HTTPTunnelPort_lines;
- config_line_t *ControlPort_lines; /**< Ports to listen on for control
+ struct config_line_t *HTTPTunnelPort_lines;
+ struct config_line_t *ControlPort_lines; /**< Ports to listen on for control
* connections. */
- config_line_t *ControlSocket; /**< List of Unix Domain Sockets to listen on
- * for control connections. */
+ /** List of Unix Domain Sockets to listen on for control connections. */
+ struct config_line_t *ControlSocket;
int ControlSocketsGroupWritable; /**< Boolean: Are control sockets g+rw? */
int UnixSocksGroupWritable; /**< Boolean: Are SOCKS Unix sockets g+rw? */
/** Ports to listen on for directory connections. */
- config_line_t *DirPort_lines;
- config_line_t *DNSPort_lines; /**< Ports to listen on for DNS requests. */
+ struct config_line_t *DirPort_lines;
+ /** Ports to listen on for DNS requests. */
+ struct config_line_t *DNSPort_lines;
/* MaxMemInQueues value as input by the user. We clean this up to be
* MaxMemInQueues. */
char *BridgePassword_AuthDigest_;
int UseBridges; /**< Boolean: should we start all circuits with a bridge? */
- config_line_t *Bridges; /**< List of bootstrap bridge addresses. */
+ struct config_line_t *Bridges; /**< List of bootstrap bridge addresses. */
- config_line_t *ClientTransportPlugin; /**< List of client
+ struct config_line_t *ClientTransportPlugin; /**< List of client
transport plugins. */
- config_line_t *ServerTransportPlugin; /**< List of client
+ struct config_line_t *ServerTransportPlugin; /**< List of client
transport plugins. */
/** List of TCP/IP addresses that transports should listen at. */
- config_line_t *ServerTransportListenAddr;
+ struct config_line_t *ServerTransportListenAddr;
/** List of options that must be passed to pluggable transports. */
- config_line_t *ServerTransportOptions;
+ struct config_line_t *ServerTransportOptions;
int BridgeRelay; /**< Boolean: are we acting as a bridge relay? We make
* this explicit so we can change how we behave in the
int FascistFirewall; /**< Whether to prefer ORs reachable on open ports. */
smartlist_t *FirewallPorts; /**< Which ports our firewall allows
* (strings). */
- config_line_t *ReachableAddresses; /**< IP:ports our firewall allows. */
- config_line_t *ReachableORAddresses; /**< IP:ports for OR conns. */
- config_line_t *ReachableDirAddresses; /**< IP:ports for Dir conns. */
+ /** IP:ports our firewall allows. */
+ struct config_line_t *ReachableAddresses;
+ struct config_line_t *ReachableORAddresses; /**< IP:ports for OR conns. */
+ struct config_line_t *ReachableDirAddresses; /**< IP:ports for Dir conns. */
int ConstrainedSockets; /**< Shrink xmit and recv socket buffers. */
uint64_t ConstrainedSockSize; /**< Size of constrained buffers. */
smartlist_t *TrackHostExits;
int TrackHostExitsExpire; /**< Number of seconds until we expire an
* addressmap */
- config_line_t *AddressMap; /**< List of address map directives. */
+ struct config_line_t *AddressMap; /**< List of address map directives. */
int AutomapHostsOnResolve; /**< If true, when we get a resolve request for a
* hostname ending with one of the suffixes in
* <b>AutomapHostsSuffixes</b>, map it to a
uint64_t PerConnBWRate; /**< Long-term bw on a single TLS conn, if set. */
uint64_t PerConnBWBurst; /**< Allowed burst on a single TLS conn, if set. */
int NumCPUs; /**< How many CPUs should we try to use? */
- config_line_t *RendConfigLines; /**< List of configuration lines
+ struct config_line_t *RendConfigLines; /**< List of configuration lines
* for rendezvous services. */
- config_line_t *HidServAuth; /**< List of configuration lines for client-side
- * authorizations for hidden services */
+ struct config_line_t *HidServAuth; /**< List of configuration lines for
+ * client-side authorizations for hidden
+ * services */
char *ContactInfo; /**< Contact info to be published in the directory. */
int HeartbeatPeriod; /**< Log heartbeat messages after this many seconds
/** List of configuration lines for replacement directory authorities.
* If you just want to replace one class of authority at a time,
* use the "Alternate*Authority" options below instead. */
- config_line_t *DirAuthorities;
+ struct config_line_t *DirAuthorities;
/** List of fallback directory servers */
- config_line_t *FallbackDir;
+ struct config_line_t *FallbackDir;
/** Whether to use the default hard-coded FallbackDirs */
int UseDefaultFallbackDirs;
/** If set, use these main (currently v3) directory authorities and
* not the default ones. */
- config_line_t *AlternateDirAuthority;
+ struct config_line_t *AlternateDirAuthority;
/** If set, use these bridge authorities and not the default one. */
- config_line_t *AlternateBridgeAuthority;
+ struct config_line_t *AlternateBridgeAuthority;
- config_line_t *MyFamily_lines; /**< Declared family for this OR. */
- config_line_t *MyFamily; /**< Declared family for this OR, normalized */
- config_line_t *NodeFamilies; /**< List of config lines for
+ struct config_line_t *MyFamily_lines; /**< Declared family for this OR. */
+ struct config_line_t *MyFamily; /**< Declared family for this OR,
+ normalized */
+ struct config_line_t *NodeFamilies; /**< List of config lines for
* node families */
smartlist_t *NodeFamilySets; /**< List of parsed NodeFamilies values. */
- config_line_t *AuthDirBadExit; /**< Address policy for descriptors to
+ struct config_line_t *AuthDirBadExit; /**< Address policy for descriptors to
* mark as bad exits. */
- config_line_t *AuthDirReject; /**< Address policy for descriptors to
+ struct config_line_t *AuthDirReject; /**< Address policy for descriptors to
* reject. */
- config_line_t *AuthDirInvalid; /**< Address policy for descriptors to
+ struct config_line_t *AuthDirInvalid; /**< Address policy for descriptors to
* never mark as valid. */
/** @name AuthDir...CC
*
enum { ACCT_MAX, ACCT_SUM, ACCT_IN, ACCT_OUT } AccountingRule;
/** Base64-encoded hash of accepted passwords for the control system. */
- config_line_t *HashedControlPassword;
+ struct config_line_t *HashedControlPassword;
/** As HashedControlPassword, but not saved. */
- config_line_t *HashedControlSessionPassword;
+ struct config_line_t *HashedControlSessionPassword;
int CookieAuthentication; /**< Boolean: do we enable cookie-based auth for
* the control system? */
uint64_t AccountingExpectedUsage;
/** A list of Entry Guard-related configuration lines. (pre-prop271) */
- config_line_t *EntryGuards;
+ struct config_line_t *EntryGuards;
/** A list of guard-related configuration lines. (post-prop271) */
- config_line_t *Guard;
+ struct config_line_t *Guard;
- config_line_t *TransportProxies;
+ struct config_line_t *TransportProxies;
/** Cached revision counters for active hidden services on this host */
- config_line_t *HidServRevCounter;
+ struct config_line_t *HidServRevCounter;
/** These fields hold information on the history of bandwidth usage for
* servers. The "Ends" fields hold the time when we last updated the
smartlist_t *BWHistoryDirWriteMaxima;
/** Build time histogram */
- config_line_t * BuildtimeHistogram;
+ struct config_line_t * BuildtimeHistogram;
int TotalBuildTimes;
int CircuitBuildAbandonedCount;
/** Holds any unrecognized values we found in the state file, in the order
* in which we found them. */
- config_line_t *ExtraLines;
+ struct config_line_t *ExtraLines;
/** When did we last rotate our onion key? "0" for 'no idea'. */
time_t LastRotatedOnionKey;
#define OR_CONNECTION_ST_H
#include "or/connection_st.h"
+#include "common/token_bucket.h"
+
+struct tor_tls_t;
/** Subtype of connection_t for an "OR connection" -- that is, one that speaks
* cells over TLS. */
char *nickname; /**< Nickname of OR on other side (if any). */
- tor_tls_t *tls; /**< TLS connection state. */
+ struct tor_tls_t *tls; /**< TLS connection state. */
int tls_error; /**< Last tor_tls error code. */
/** When we last used this conn for any client traffic. If not
* recent, we can rate limit it further. */
};
#endif
-
#ifndef OR_HANDSHAKE_CERTS_ST
#define OR_HANDSHAKE_CERTS_ST
+struct tor_x509_cert_t;
+
/** Structure to hold all the certificates we've received on an OR connection
*/
struct or_handshake_certs_t {
int started_here;
/** The cert for the 'auth' RSA key that's supposed to sign the AUTHENTICATE
* cell. Signed with the RSA identity key. */
- tor_x509_cert_t *auth_cert;
+ struct tor_x509_cert_t *auth_cert;
/** The cert for the 'link' RSA key that was used to negotiate the TLS
* connection. Signed with the RSA identity key. */
- tor_x509_cert_t *link_cert;
+ struct tor_x509_cert_t *link_cert;
/** A self-signed identity certificate: the RSA identity key signed
* with itself. */
- tor_x509_cert_t *id_cert;
+ struct tor_x509_cert_t *id_cert;
/** The Ed25519 signing key, signed with the Ed25519 identity key. */
struct tor_cert_st *ed_id_sign;
/** A digest of the X509 link certificate for the TLS connection, signed
};
#endif
-
#include "or/config.h"
#include "or/main.h"
#include "or/periodic.h"
+#include "common/compat_libevent.h"
/** We disable any interval greater than this number of seconds, on the
* grounds that it is probably an absolute time mistakenly passed in as a
mainloop_event_cancel(event->ev);
event->enabled = 0;
}
-
#include "or/routerparse.h"
#include "or/geoip.h"
#include "ht.h"
+#include "lib/encoding/confline.h"
#include "or/dir_server_st.h"
#include "or/microdesc_st.h"
}
HT_CLEAR(policy_map, &policy_root);
}
-
uint32_t local_address,
const tor_addr_t *ipv6_local_address,
smartlist_t **result);
-int policies_parse_exit_policy(config_line_t *cfg, smartlist_t **dest,
+int policies_parse_exit_policy(struct config_line_t *cfg, smartlist_t **dest,
exit_policy_parser_cfg_t options,
const smartlist_t *configured_addresses);
void policies_parse_exit_policy_reject_private(
#endif /* defined(POLICIES_PRIVATE) */
#endif /* !defined(TOR_POLICIES_H) */
-
#include "or/or.h"
#include "or/config.h"
#include "or/reasons.h"
+#include "lib/tls/tortls.h"
/***************************** Edge (stream) reasons **********************/
return "HTTP/1.0 500 Internal Server Error (weird end reason)\r\n\r\n";
}
}
-
#include "or/or.h"
#include "or/circuitlist.h"
#include "or/config.h"
+#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_util.h"
#include "or/hs_ntor.h" // for HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN
#include "or/relay.h"
tor_assert(crypto->f_digest);
tor_assert(crypto->b_digest);
}
-
#ifndef RELAY_CRYPTO_ST_H
#define RELAY_CRYPTO_ST_H
+#define crypto_cipher_t aes_cnt_cipher
+struct crypto_cipher_t;
+struct crypto_digest_t;
+
struct relay_crypto_t {
/* crypto environments */
/** Encryption key and counter for cells heading towards the OR at this
* step. */
- crypto_cipher_t *f_crypto;
+ struct crypto_cipher_t *f_crypto;
/** Encryption key and counter for cells heading back from the OR at this
* step. */
- crypto_cipher_t *b_crypto;
+ struct crypto_cipher_t *b_crypto;
/** Digest state for cells heading towards the OR at this step. */
- crypto_digest_t *f_digest; /* for integrity checking */
+ struct crypto_digest_t *f_digest; /* for integrity checking */
/** Digest state for cells heading away from the OR at this step. */
- crypto_digest_t *b_digest;
+ struct crypto_digest_t *b_digest;
};
+#undef crypto_cipher_t
#endif
-
#ifndef REND_INTRO_POINT_ST_H
#define REND_INTRO_POINT_ST_H
+struct replaycache_t;
+struct crypto_pk_t;
+
/** Introduction point information. Used both in rend_service_t (on
* the service side) and in rend_service_descriptor_t (on both the
* client and service side). */
struct rend_intro_point_t {
extend_info_t *extend_info; /**< Extend info for connecting to this
* introduction point via a multi-hop path. */
- crypto_pk_t *intro_key; /**< Introduction key that replaces the service
- * key, if this descriptor is V2. */
+ struct crypto_pk_t *intro_key; /**< Introduction key that replaces the
+ * service key, if this descriptor is V2. */
/** (Client side only) Flag indicating that a timeout has occurred
* after sending an INTRODUCE cell to this intro point. After a
/** (Service side only) A replay cache recording the RSA-encrypted parts
* of INTRODUCE2 cells this intro point's circuit has received. This is
* used to prevent replay attacks. */
- replaycache_t *accepted_intro_rsa_parts;
+ struct replaycache_t *accepted_intro_rsa_parts;
/** (Service side only) Count of INTRODUCE2 cells accepted from this
* intro point.
};
#endif
-
#include "or/connection.h"
#include "or/connection_edge.h"
#include "or/control.h"
+#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "or/directory.h"
#include "or/router.h"
#include "or/routerlist.h"
#include "or/routerset.h"
+#include "lib/encoding/confline.h"
#include "or/cpath_build_state_st.h"
#include "or/crypt_path_st.h"
return 0;
#endif /* defined(NON_ANONYMOUS_MODE_ENABLED) */
}
-
#include "or/rendmid.h"
#include "or/rendservice.h"
#include "or/rephist.h"
+#include "or/replaycache.h"
#include "or/router.h"
#include "or/routerlist.h"
#include "or/routerparse.h"
match:
return 1;
}
-
#include "or/routerlist.h"
#include "or/routerparse.h"
#include "or/routerset.h"
+#include "lib/encoding/confline.h"
#include "or/cpath_build_state_st.h"
#include "or/crypt_path_st.h"
}
#endif /* defined(TOR_UNIT_TESTS) */
-
#include "or/or.h"
#include "or/hs_service.h"
+#include "lib/crypt_ops/crypto_dh.h"
typedef struct rend_intro_cell_s rend_intro_cell_t;
#endif /* defined(RENDSERVICE_PRIVATE) */
int rend_num_services(void);
-int rend_config_service(const config_line_t *line_,
+int rend_config_service(const struct config_line_t *line_,
const or_options_t *options,
hs_service_config_t *config);
void rend_service_prune_list(void);
int rend_service_non_anonymous_mode_enabled(const or_options_t *options);
#endif /* !defined(TOR_RENDSERVICE_H) */
-
#ifndef TOR_REPLAYCACHE_H
#define TOR_REPLAYCACHE_H
-typedef struct replaycache_s replaycache_t;
+typedef struct replaycache_t replaycache_t;
#ifdef REPLAYCACHE_PRIVATE
-struct replaycache_s {
+struct replaycache_t {
/* Scrub interval */
time_t scrub_interval;
/* Last scrubbed */
void replaycache_scrub_if_needed(replaycache_t *r);
#endif /* !defined(TOR_REPLAYCACHE_H) */
-
#include "or/routerinfo_st.h"
#include "lib/osinfo/uname.h"
+#include "lib/tls/tortls.h"
+#include "lib/encoding/confline.h"
/**
* \file router.c
#include "or/or.h"
#include "or/config.h"
-#include "lib/crypt_ops/crypto_util.h"
#include "or/router.h"
-#include "lib/crypt_ops/crypto_pwbox.h"
#include "or/routerkeys.h"
#include "or/torcert.h"
+
+#include "lib/crypt_ops/crypto_pwbox.h"
+#include "lib/crypt_ops/crypto_util.h"
#include "lib/term/getpass.h"
+#include "lib/tls/tortls.h"
#define ENC_KEY_HEADER "Boxed Ed25519 key"
#define ENC_KEY_TAG "master"
#include "lib/container/buffers.h"
#define TOR_CHANNEL_INTERNAL_
#include "or/channeltls.h"
+#include "common/compat_libevent.h"
#include "or/or_connection_st.h"
}
#endif /* defined(TOR_UNIT_TESTS) */
-
#include "or/router.h"
#include "lib/sandbox/sandbox.h"
#include "or/statefile.h"
+#include "lib/encoding/confline.h"
/** A list of state-file "abbreviations," for compatibility. */
static config_abbrev_t state_abbrevs_[] = {
or_state_free(global_state);
global_state = NULL;
}
-
void or_state_mark_dirty(or_state_t *state, time_t when);
#ifdef STATEFILE_PRIVATE
-STATIC config_line_t *get_transport_in_state_by_name(const char *transport);
+STATIC struct config_line_t *get_transport_in_state_by_name(
+ const char *transport);
STATIC void or_state_free_(or_state_t *state);
#define or_state_free(st) FREE_AND_NULL(or_state_t, or_state_free_, (st))
STATIC or_state_t *or_state_new(void);
#endif
#endif /* !defined(TOR_STATEFILE_H) */
-
#include "or/dos.h"
#include "or/routerinfo_st.h"
+#include "lib/tls/tortls.h"
static void log_accounting(const time_t now, const or_options_t *options);
#include "or/geoip.h"
tor_free(acc_max);
tor_free(remaining);
}
-
#include "lib/log/torlog.h"
#include "common/util.h"
#include "trunnel/link_handshake.h"
+#include "lib/tls/tortls.h"
#include "or/or_handshake_certs_st.h"
tor_free(ed_cert_b64);
return ret;
}
-
unsigned cert_valid : 1;
} tor_cert_t;
+struct tor_tls_t;
+
tor_cert_t *tor_cert_create(const ed25519_keypair_t *signing_key,
uint8_t cert_type,
const ed25519_public_key_t *signed_key,
FREE_AND_NULL(or_handshake_certs_t, or_handshake_certs_free_, (certs))
int or_handshake_certs_rsa_ok(int severity,
or_handshake_certs_t *certs,
- tor_tls_t *tls,
+ struct tor_tls_t *tls,
time_t now);
int or_handshake_certs_ed25519_ok(int severity,
or_handshake_certs_t *certs,
- tor_tls_t *tls,
+ struct tor_tls_t *tls,
time_t now);
void or_handshake_certs_check_both(int severity,
or_handshake_certs_t *certs,
- tor_tls_t *tls,
+ struct tor_tls_t *tls,
time_t now,
const ed25519_public_key_t **ed_id_out,
const common_digests_t **rsa_id_out);
int tor_cert_encode_ed22519(const tor_cert_t *cert, char **cert_str_out);
#endif /* !defined(TORCERT_H_INCLUDED) */
-
#include "or/config.h"
#include "lib/crypt_ops/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto_dh.h"
#include "or/onion_ntor.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "or/consdiff.h"
+#include "lib/compress/compress.h"
#include "or/cell_st.h"
#include "or/or_circuit_st.h"
#include "lib/err/backtrace.h"
#include "or/config.h"
#include "test/fuzz/fuzzing.h"
+#include "lib/compress/compress.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_ed25519.h"
}
#endif
-
**/
#include "orconfig.h"
+#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_rand.h"
#include <stdio.h>
#include "or/or.h"
#include "lib/container/buffers.h"
#include "lib/tls/buffers_tls.h"
+#include "lib/tls/tortls.h"
+#include "lib/compress/compress.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "or/proto_http.h"
#include "or/proto_socks.h"
END_OF_TESTCASES
};
-
TEST(is_destroy, 0),
END_OF_TESTCASES
};
-
#include "or/main.h"
#include "or/networkstatus.h"
#include "test/log_test_helpers.h"
+#include "lib/tls/tortls.h"
#include "or/cell_st.h"
#include "or/networkstatus_st.h"
TEST_CHANNELPADDING(channelpadding_timers, TT_FORK),
END_OF_TESTCASES
};
-
#include "lib/fs/conffile.h"
#include "lib/meminfo/meminfo.h"
#include "lib/net/gethostname.h"
+#include "lib/encoding/confline.h"
static void
test_config_addressmap(void *arg)
#include "or/or.h"
#include "or/config.h"
#include "or/conscache.h"
+#include "lib/encoding/confline.h"
#include "test/test.h"
#ifdef HAVE_UTIME_H
ENT(filter),
END_OF_TESTCASES
};
-
#include "or/networkstatus.h"
#include "or/routerparse.h"
#include "common/workqueue.h"
+#include "lib/compress/compress.h"
+#include "lib/encoding/confline.h"
#include "or/networkstatus_st.h"
END_OF_TESTCASES
};
-
#include "common/util.h"
#include "siphash.h"
#include "lib/crypt_ops/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto_hkdf.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "ed25519_vectors.inc"
#include "or/relay.h"
#include "test/log_test_helpers.h"
#include "or/voting_schedule.h"
+#include "lib/compress/compress.h"
#include "or/authority_cert_st.h"
#include "or/document_signature_st.h"
#include "or/entry_connection_st.h"
#include "or/socks_request_st.h"
+#include "lib/encoding/confline.h"
+
static void *
entryconn_rewrite_setup(const struct testcase_t *tc)
{
END_OF_TESTCASES
};
-
#include "test/log_test_helpers.h"
#include "lib/container/bloomfilt.h"
+#include "lib/encoding/confline.h"
/* TODO:
* choose_random_entry() test with state set.
#include "or/nodelist.h"
#include "or/relay.h"
#include "or/routerlist.h"
+#include "lib/encoding/confline.h"
#include "or/cell_st.h"
#include "or/connection_st.h"
}
return opt;
}
-
#include "or/config.h"
#include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_dh.h"
#include "or/channeltls.h"
#include "or/main.h"
#include "or/nodelist.h"
#include "or/routerset.h"
#include "or/hs_circuit.h"
+#include "or/hs_circuitmap.h"
#include "or/hs_client.h"
#include "or/hs_ident.h"
#include "or/hs_cache.h"
TT_FORK, NULL, NULL },
END_OF_TESTCASES
};
-
#include "or/hs_intropoint.h"
#include "or/hs_ntor.h"
#include "or/hs_circuit.h"
+#include "or/hs_circuitmap.h"
#include "or/hs_service.h"
#include "or/hs_client.h"
#include "or/main.h"
END_OF_TESTCASES
};
-
#include "or/or_handshake_state_st.h"
#include "or/var_cell_st.h"
+#include "lib/tls/tortls.h"
+
#include "test/test.h"
#include "test/log_test_helpers.h"
#include "lib/sandbox/sandbox.h"
#include "lib/memarea/memarea.h"
#include "lib/osinfo/uname.h"
+#include "lib/encoding/confline.h"
#include "or/policies.h"
#include "test/test_helpers.h"
#include "or/routerparse.h"
#define POLICIES_PRIVATE
#include "or/policies.h"
+#include "lib/encoding/confline.h"
#include "test/test.h"
#include "or/node_st.h"
test_policies_fascist_firewall_choose_address, 0, NULL, NULL },
END_OF_TESTCASES
};
-
#include "or/statefile.h"
#include "test/test.h"
#include "lib/process/subprocess.h"
+#include "lib/encoding/confline.h"
static void
reset_mp(managed_proxy_t *mp)
#include "or/node_st.h"
#include "or/routerstatus_st.h"
+#include "lib/encoding/confline.h"
+
#include "test/test.h"
#include "test/test_dir_common.h"
#include "test/log_test_helpers.h"
{ "warn_early_consensus", test_warn_early_consensus, 0, NULL, NULL },
END_OF_TESTCASES
};
-
#include "or/main.h"
#include "or/nodelist.h"
#include "or/statefile.h"
+#include "lib/tls/tortls.h"
#include "or/origin_circuit_st.h"
#include "or/routerinfo_st.h"
TEST_CASE_ASPECT(log_heartbeat, tls_write_overhead),
END_OF_TESTCASES
};
-
#include "or/or.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/fs/storagedir.h"
+#include "lib/encoding/confline.h"
#include "test/test.h"
#ifdef HAVE_UTIME_H
ENT(read_labeled),
END_OF_TESTCASES
};
-
#include "lib/memarea/memarea.h"
#include "lib/process/waitpid.h"
#include "test/log_test_helpers.h"
+#include "lib/compress/compress.h"
#include "lib/compress/compress_zstd.h"
#include "lib/encoding/keyval.h"
#include "lib/fdio/fdio.h"
#include "lib/math/laplace.h"
#include "lib/meminfo/meminfo.h"
#include "lib/time/tvdiff.h"
+#include "lib/encoding/confline.h"
#ifdef HAVE_PWD_H
#include <pwd.h>
#include "or/or.h"
#include "or/control.h"
#include "or/config.h"
+#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "or/rephist.h"
#include "lib/err/backtrace.h"
#include "test/test.h"
#include "or/channelpadding.h"
#include "or/main.h"
+#include "lib/compress/compress.h"
+#include "common/compat_libevent.h"
#include <stdio.h>
#ifdef HAVE_FCNTL_H