mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Remove needless includes from or.h
or.h should really include only the minimum of stuff from or/*, common/*, and lib/*.
This commit is contained in:
@@ -21,10 +21,12 @@
|
||||
|
||||
#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"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#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"
|
||||
|
||||
@@ -189,4 +190,3 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
**/
|
||||
|
||||
#include "orconfig.h"
|
||||
#include "lib/crypt_ops/crypto_dh.h"
|
||||
#include "lib/crypt_ops/crypto_rand.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#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"
|
||||
@@ -819,4 +821,3 @@ struct testcase_t buffer_tests[] = {
|
||||
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -1302,4 +1302,3 @@ struct testcase_t cell_format_tests[] = {
|
||||
TEST(is_destroy, 0),
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#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"
|
||||
@@ -1168,4 +1169,3 @@ struct testcase_t channelpadding_tests[] = {
|
||||
TEST_CHANNELPADDING(channelpadding_timers, TT_FORK),
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#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)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#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
|
||||
@@ -337,4 +338,3 @@ struct testcase_t conscache_tests[] = {
|
||||
ENT(filter),
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#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"
|
||||
|
||||
@@ -896,4 +898,3 @@ struct testcase_t consdiffmgr_tests[] = {
|
||||
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
#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"
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#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"
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#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)
|
||||
{
|
||||
@@ -833,4 +835,3 @@ struct testcase_t entryconn_tests[] = {
|
||||
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "test/log_test_helpers.h"
|
||||
|
||||
#include "lib/container/bloomfilt.h"
|
||||
#include "lib/encoding/confline.h"
|
||||
|
||||
/* TODO:
|
||||
* choose_random_entry() test with state set.
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#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"
|
||||
@@ -282,4 +283,3 @@ helper_parse_options(const char *conf)
|
||||
}
|
||||
return opt;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
|
||||
#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"
|
||||
@@ -609,4 +611,3 @@ struct testcase_t hs_client_tests[] = {
|
||||
TT_FORK, NULL, NULL },
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#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"
|
||||
@@ -1634,4 +1635,3 @@ struct testcase_t hs_service_tests[] = {
|
||||
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#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"
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#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"
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#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"
|
||||
@@ -2450,4 +2451,3 @@ struct testcase_t policy_tests[] = {
|
||||
test_policies_fascist_firewall_choose_address, 0, NULL, NULL },
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#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)
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#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"
|
||||
@@ -782,4 +784,3 @@ struct testcase_t routerlist_tests[] = {
|
||||
{ "warn_early_consensus", test_warn_early_consensus, 0, NULL, NULL },
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#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"
|
||||
@@ -1097,4 +1098,3 @@ struct testcase_t status_tests[] = {
|
||||
TEST_CASE_ASPECT(log_heartbeat, tls_write_overhead),
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#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
|
||||
@@ -373,4 +374,3 @@ struct testcase_t storagedir_tests[] = {
|
||||
ENT(read_labeled),
|
||||
END_OF_TESTCASES
|
||||
};
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#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"
|
||||
@@ -35,6 +36,7 @@
|
||||
#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>
|
||||
|
||||
@@ -13,12 +13,15 @@
|
||||
#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
|
||||
|
||||
Reference in New Issue
Block a user