From d8c3feaf5ee55dd0a56d8e47553f7f7ffab8aad5 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 22 Apr 2020 15:06:32 +0200 Subject: [PATCH] Remove port of tor Fixes #205 --- ports/tor.hash | 1 - ports/tor.port | 11 - run/eigentor.run | 254 ------------ run/tor_lx.run | 185 --------- src/app/tor/build.patch | 39 -- src/app/tor/micro-revision.i | 1 - src/app/tor/no_cloexec.patch | 15 - src/app/tor/no_flock.patch | 17 - src/app/tor/no_signals.patch | 14 - src/app/tor/orconfig.h | 748 ----------------------------------- src/app/tor/target.mk | 192 --------- 11 files changed, 1477 deletions(-) delete mode 100644 ports/tor.hash delete mode 100644 ports/tor.port delete mode 100644 run/eigentor.run delete mode 100644 run/tor_lx.run delete mode 100644 src/app/tor/build.patch delete mode 100644 src/app/tor/micro-revision.i delete mode 100644 src/app/tor/no_cloexec.patch delete mode 100644 src/app/tor/no_flock.patch delete mode 100644 src/app/tor/no_signals.patch delete mode 100644 src/app/tor/orconfig.h delete mode 100644 src/app/tor/target.mk diff --git a/ports/tor.hash b/ports/tor.hash deleted file mode 100644 index 3e49e80..0000000 --- a/ports/tor.hash +++ /dev/null @@ -1 +0,0 @@ -869893f0befc9ef98bc18be646417e50733d946c diff --git a/ports/tor.port b/ports/tor.port deleted file mode 100644 index aff68bd..0000000 --- a/ports/tor.port +++ /dev/null @@ -1,11 +0,0 @@ -LICENSE := BSD-like -VERSION := git -DOWNLOADS := tor.git -URL(tor) := https://github.com/torproject/tor.git -REV(tor) := 51d14b3d478a94c410a695f736445f42ccc23fb9 -DIR(tor) := src/app/tor -PATCHES := src/app/tor/build.patch \ - src/app/tor/no_cloexec.patch \ - src/app/tor/no_flock.patch \ - src/app/tor/no_signals.patch -PATCH_OPT := -p1 -d src/app/tor diff --git a/run/eigentor.run b/run/eigentor.run deleted file mode 100644 index 08a068a..0000000 --- a/run/eigentor.run +++ /dev/null @@ -1,254 +0,0 @@ -# -# \brief Test for TOR -# \author Stefan Kalkowski -# \date 2016-06-24 -# - -# -# Currently this scenario needs static network settings, -# which we can only anticipate under QEMU -# -assert_spec x86 -if {![have_include power_on/qemu]} { - puts "\n Run script is not supported on this platform. \n"; exit 0 } - -create_boot_directory -import_from_depot [depot_user]/src/[base_src] \ - [depot_user]/pkg/[drivers_nic_pkg] \ - [depot_user]/src/init \ - [depot_user]/src/curl \ - [depot_user]/src/dynamic_rom \ - [depot_user]/src/fetchurl \ - [depot_user]/src/libc \ - [depot_user]/src/libcrypto \ - [depot_user]/src/libssl \ - [depot_user]/src/libssh \ - [depot_user]/src/nic_router \ - [depot_user]/src/posix \ - [depot_user]/src/ram_fs \ - [depot_user]/src/report_rom \ - [depot_user]/src/rtc_drv \ - [depot_user]/src/vfs_jitterentropy \ - [depot_user]/src/vfs_lxip \ - [depot_user]/src/vfs \ - [depot_user]/src/zlib -build { app/tor } - -install_config { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -SOCKSPort 10.1.2.2:9050 -DataDirectory /tor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2000-01-01 00:00 - 01234567890123456789 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -build_boot_image { libevent.lib.so tor } - -# -# Prepare network environment -# - -set tapdev tap0 -set netdev eth0 -set username $tcl_platform(user) - -if {[have_include power_on/qemu]} { - if { [info exists ::env(TAP) ] } { - set tapdev $::env(TAP) } - if { [info exists ::env(ETH) ] } { - set netdev $::env(ETH) } - - exec sudo ip tuntap add dev $tapdev mode tap user $username - exec sudo ip address flush dev $tapdev - exec sudo ip address add 10.1.1.1/24 dev $tapdev - exec sudo iptables -t nat -A POSTROUTING -o $netdev -j MASQUERADE - exec sudo iptables -A FORWARD -i $tapdev -o $netdev -j ACCEPT - exec sudo iptables -A FORWARD -i $netdev -o $tapdev -m state --state RELATED,ESTABLISHED -j ACCEPT - exec sudo sysctl -w net.ipv4.ip_forward=1 - - append qemu_args " -nographic -net nic,model=e1000 -net tap,ifname=tap0,downscript=no,script=no " -} - -# -# Execute test case -# - -run_genode_until {.*Congratulations. This browser is configured to use Tor.*/n} 300 -set serial_id [output_spawn_id] -set core_pid [exp_pid -i $serial_id] -exec kill -9 $core_pid - -# -# Reset network environment again -# - -if {[have_include power_on/qemu]} { - exec sudo sysctl -w net.ipv4.ip_forward=0 >/dev/null - exec sudo iptables -F - exec sudo iptables -t nat -F - exec sudo ip link set $tapdev down - exec sudo ip address flush dev $tapdev - exec sudo ip tuntap del dev $tapdev mode tap -} - -# vi: set ft=tcl : diff --git a/run/tor_lx.run b/run/tor_lx.run deleted file mode 100644 index e604130..0000000 --- a/run/tor_lx.run +++ /dev/null @@ -1,185 +0,0 @@ -# -# \brief Test for TOR on Linux -# \author Stefan Kalkowski -# \date 2016-06-24 -# - -if {![have_spec linux]} { - puts "\n Run script is not supported on this platform. \n"; exit 0 } - -set tapdev tap0 -set netdev eth0 -set netprefix 192.168.1 - -set username $tcl_platform(user) - -if { [info exists ::env(TAP) ] } { - set tapdev $::env(TAP) } -if { [info exists ::env(ETH) ] } { - set netdev $::env(ETH) } -if { [info exists ::env(NET) ] } { - set netprefix $::env(NET) } - -# -# Build -# - -set build_components { - core init - timer - drivers/rtc - drivers/nic - server/ram_fs - app/tor - lib/vfs/jitterentropy -} - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Generate config -# - -set config { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } -append config " -SOCKSPort $netprefix.2:9050" -append config { -DataDirectory /tor - - - - - - - - - - - " -append config { - - - - - - - - - - - - - } - -append_platform_drv_config - -append config { - - - - - -} - -install_config $config - -# -# Boot modules -# - -# generic modules -set boot_modules { - core init timer rtc_drv - ld.lib.so libc.lib.so vfs.lib.so libm.lib.so zlib.lib.so posix.lib.so - libcrypto.lib.so libevent.lib.so libssl.lib.so pthread.lib.so - vfs_jitterentropy.lib.solwip_legacy.lib.so - linux_nic_drv ram_fs tor -} - -# platform-specific modules -append_platform_drv_boot_modules - -build_boot_image $boot_modules - - -# -# Prepare network environment -# - -exec sudo tunctl -u $username -t $tapdev -exec sudo ifconfig $tapdev up -exec sudo ifconfig $tapdev $netprefix.1 netmask 255.255.255.0 -exec sudo iptables -t nat -A POSTROUTING -o $netdev -j MASQUERADE -exec sudo iptables -A FORWARD -i $tapdev -o $netdev -j ACCEPT -exec sudo iptables -A FORWARD -i $netdev -o tapdev -m state --state RELATED,ESTABLISHED -j ACCEPT -exec sudo sysctl -w net.ipv4.ip_forward=1 - - -# -# Execute test case -# - -run_genode_until {.* Bootstrapped 100%: Done.*\n} 200 -set serial_id [output_spawn_id] -set core_pid [exp_pid -i $serial_id] -spawn curl --socks5-hostname $netprefix.2:9050 https://check.torproject.org/ -set curl_id $spawn_id -sleep 5 -exec kill -9 $core_pid - - -# -# Reset network environment again -# - -exec sudo sysctl -w net.ipv4.ip_forward=0 -exec sudo iptables -F -exec sudo iptables -t nat -F -exec sudo ifconfig $tapdev down -exec sudo tunctl -d $tapdev - -run_genode_until {.*Congratulations. This browser is configured to use Tor.*/n} 5 $curl_id - -# vi: set ft=tcl : diff --git a/src/app/tor/build.patch b/src/app/tor/build.patch deleted file mode 100644 index 837fbd5..0000000 --- a/src/app/tor/build.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/src/common/compat.h b/src/common/compat.h -index 6f102be..30325a8 100644 ---- a/src/common/compat.h -+++ b/src/common/compat.h -@@ -41,6 +41,9 @@ - #ifdef HAVE_NETINET6_IN6_H - #include - #endif -+#ifdef HAVE_FCNTL_H -+#include -+#endif - - #if defined(__has_feature) - # if __has_feature(address_sanitizer) -diff --git a/src/ext/ed25519/donna/ed25519_tor.c b/src/ext/ed25519/donna/ed25519_tor.c -index 07f6a0f..db7fcaa 100644 ---- a/src/ext/ed25519/donna/ed25519_tor.c -+++ b/src/ext/ed25519/donna/ed25519_tor.c -@@ -131,6 +131,8 @@ ED25519_FN(curved25519_scalarmult_basepoint) (curved25519_key pk, const curved25 - curve25519_contract(pk, yplusz); - } - -+#include -+ - /* - Tor has a specific idea of how an Ed25519 implementaion should behave. - Implement such a beast using the ed25519-donna primitives/internals. -diff --git a/src/ext/tor_readpassphrase.h b/src/ext/tor_readpassphrase.h -index 64f5668..2e2e3d7 100644 ---- a/src/ext/tor_readpassphrase.h -+++ b/src/ext/tor_readpassphrase.h -@@ -25,6 +25,7 @@ - #ifndef _READPASSPHRASE_H_ - #define _READPASSPHRASE_H_ - -+#include - #include "orconfig.h" - - #ifndef HAVE_READPASSPHRASE diff --git a/src/app/tor/micro-revision.i b/src/app/tor/micro-revision.i deleted file mode 100644 index 68cddf1..0000000 --- a/src/app/tor/micro-revision.i +++ /dev/null @@ -1 +0,0 @@ -"cb8557f7c93abc8b" diff --git a/src/app/tor/no_cloexec.patch b/src/app/tor/no_cloexec.patch deleted file mode 100644 index cb96fcd..0000000 --- a/src/app/tor/no_cloexec.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/common/compat.c b/src/common/compat.c -index bae76f4..bf0c4fd 100644 ---- a/src/common/compat.c -+++ b/src/common/compat.c -@@ -152,6 +152,10 @@ SecureZeroMemory(PVOID ptr, SIZE_T cnt) - #include "strlcat.c" - #endif - -+#ifdef FD_CLOEXEC -+#undef FD_CLOEXEC -+#endif -+ - /* When set_max_file_descriptors() is called, update this with the max file - * descriptor value so we can use it to check the limit when opening a new - * socket. Default value is what Debian sets as the default hard limit. */ diff --git a/src/app/tor/no_flock.patch b/src/app/tor/no_flock.patch deleted file mode 100644 index 205c111..0000000 --- a/src/app/tor/no_flock.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/or/config.c b/src/or/config.c -index cdd4f10..9a91ff0 100644 ---- a/src/or/config.c -+++ b/src/or/config.c -@@ -1483,10 +1483,12 @@ options_act(const or_options_t *old_options) - /* Write control ports to disk as appropriate */ - control_ports_write_to_file(); - -+#ifdef NOT_GENODE - if (running_tor && !have_lockfile()) { - if (try_locking(options, 1) < 0) - return -1; - } -+#endif - - if (consider_adding_dir_servers(options, old_options) < 0) - return -1; diff --git a/src/app/tor/no_signals.patch b/src/app/tor/no_signals.patch deleted file mode 100644 index 4baacf7..0000000 --- a/src/app/tor/no_signals.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/or/main.c b/src/or/main.c -index cb24fd18c..952f2397b 100644 ---- a/src/or/main.c -+++ b/src/or/main.c -@@ -2420,7 +2420,9 @@ do_main_loop(void) - } - } - -+#ifdef NOT_GENODE - handle_signals(1); -+#endif - monotime_init(); - timers_initialize(); - diff --git a/src/app/tor/orconfig.h b/src/app/tor/orconfig.h deleted file mode 100644 index b85cfec..0000000 --- a/src/app/tor/orconfig.h +++ /dev/null @@ -1,748 +0,0 @@ -/* orconfig.h. Generated from orconfig.h.in by configure. */ -/* orconfig.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* tor's configuration directory */ -#define CONFDIR "/etc/tor" - -/* Defined if we're not going to look for a torrc in SYSCONF */ -/* #undef DISABLE_SYSTEM_TORRC */ - -/* Define to 1 iff memset(0) sets doubles to 0.0 */ -#define DOUBLE_0_REP_IS_ZERO_BYTES 1 - -/* Defined if we default to host local appdata paths on Windows */ -/* #undef ENABLE_LOCAL_APPDATA */ - -/* Define if enum is always signed */ -/* #undef ENUM_VALS_ARE_SIGNED */ - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like `struct s { int n; double - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. When computing the size of such an object, don't use 'sizeof - (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' - instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with - MSVC and with C++ compilers. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define to 1 if you have the `accept4' function. */ -#define HAVE_ACCEPT4 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the `backtrace' function. */ -#define HAVE_BACKTRACE 1 - -/* Define to 1 if you have the `backtrace_symbols_fd' function. */ -#define HAVE_BACKTRACE_SYMBOLS_FD 1 - -/* Define to 1 if you have the `cap_set_proc' function. */ -/* #undef HAVE_CAP_SET_PROC */ - -/* True if we have -Wnull-dereference */ -/* #undef HAVE_CFLAG_WNULL_DEREFERENCE */ - -/* True if we have -Woverlength-strings */ -#define HAVE_CFLAG_WOVERLENGTH_STRINGS 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CRT_EXTERNS_H */ - -/* Define to 1 if you have the header file. - */ -/* #undef HAVE_CRYPTO_SCALARMULT_CURVE25519_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CYGWIN_SIGNAL_H */ - -/* Define to 1 if you have the declaration of `mlockall', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MLOCKALL */ - -/* Define to 1 if you have the declaration of `SecureZeroMemory', and to 0 if - you don't. */ -/* #undef HAVE_DECL_SECUREZEROMEMORY */ - -/* Define to 1 if you have the declaration of `_getwch', and to 0 if you - don't. */ -/* #undef HAVE_DECL__GETWCH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DMALLOC_H */ - -/* Define to 1 if you have the `dmalloc_strdup' function. */ -/* #undef HAVE_DMALLOC_STRDUP */ - -/* Define to 1 if you have the `dmalloc_strndup' function. */ -/* #undef HAVE_DMALLOC_STRNDUP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_EVENT2_BUFFEREVENT_SSL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_EVENT2_DNS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_EVENT2_EVENT_H 1 - -/* Define to 1 if you have the `eventfd' function. */ -/* #undef HAVE_EVENTFD */ - -/* Define to 1 if you have the `event_get_version_number' function. */ -#define HAVE_EVENT_GET_VERSION_NUMBER 1 - -/* Define to 1 if you have the `EVP_PBE_scrypt' function. */ -/* #undef HAVE_EVP_PBE_SCRYPT */ - -/* Define to 1 if you have the `evutil_secure_rng_init' function. */ -#define HAVE_EVUTIL_SECURE_RNG_INIT 1 - -/* Define to 1 if you have the `evutil_secure_rng_set_urandom_device_file' - function. */ -/* #undef HAVE_EVUTIL_SECURE_RNG_SET_URANDOM_DEVICE_FILE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_EXECINFO_H */ - -/* Define to 1 if you have the `explicit_bzero' function. */ -/* #undef HAVE_EXPLICIT_BZERO */ - -/* Defined if we have extern char **environ already declared */ -/* #undef HAVE_EXTERN_ENVIRON_DECLARED */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `flock' function. */ -#define HAVE_FLOCK 1 - -/* Define to 1 if you have the `ftime' function. */ -#define HAVE_FTIME 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getentropy' function. */ -/* #undef HAVE_GETENTROPY */ - -/* Define this if you have any gethostbyname_r() */ -#define HAVE_GETHOSTBYNAME_R 1 - -/* Define this if gethostbyname_r takes 3 arguments */ -/* #undef HAVE_GETHOSTBYNAME_R_3_ARG */ - -/* Define this if gethostbyname_r takes 5 arguments */ -/* #undef HAVE_GETHOSTBYNAME_R_5_ARG */ - -/* Define this if gethostbyname_r takes 6 arguments */ -#define HAVE_GETHOSTBYNAME_R_6_ARG 1 - -/* Define to 1 if you have the `getifaddrs' function. */ -/* #undef HAVE_GETIFADDRS */ - -/* Define to 1 if you have the `getpass' function. */ -#define HAVE_GETPASS 1 - -/* Define to 1 if you have the `getresgid' function. */ -/* #undef HAVE_GETRESGID */ - -/* Define to 1 if you have the `getresuid' function. */ -/* #undef HAVE_GETRESUID */ - -/* Define to 1 if you have the `getrlimit' function. */ -/* #undef HAVE_GETRLIMIT */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `gmtime_r' function. */ -#define HAVE_GMTIME_R 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GRP_H 1 - -/* Define to 1 if you have the `htonll' function. */ -/* #undef HAVE_HTONLL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_IFADDRS_H 1 - -/* Define to 1 if you have the `inet_aton' function. */ -#define HAVE_INET_ATON 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `ioctl' function. */ -#define HAVE_IOCTL 1 - -/* Define to 1 if you have the `issetugid' function. */ -/* #undef HAVE_ISSETUGID */ - -/* Define to 1 if you have the `cap' library (-lcap). */ -/* #undef HAVE_LIBCAP */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBSCRYPT_H */ - -/* Define to 1 if you have the `libscrypt_scrypt' function. */ -/* #undef HAVE_LIBSCRYPT_SCRYPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LINUX_IF_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LINUX_NETFILTER_IPV4_H */ - -/* Define to 1 if you have the header - file. */ -/* #undef HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LINUX_TYPES_H */ - -/* Define to 1 if you have the `llround' function. */ -/* #undef HAVE_LLROUND */ - -/* Define to 1 if you have the `localtime_r' function. */ -#define HAVE_LOCALTIME_R 1 - -/* Define to 1 if you have the `lround' function. */ -/* #undef HAVE_LROUND */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_LIMITS_H */ - -/* Defined if the compiler supports __FUNCTION__ */ -#define HAVE_MACRO__FUNCTION__ 1 - -/* Defined if the compiler supports __FUNC__ */ -/* #undef HAVE_MACRO__FUNC__ */ - -/* Defined if the compiler supports __func__ */ -#define HAVE_MACRO__func__ 1 - -/* Define to 1 if you have the `mallinfo' function. */ -/* #undef HAVE_MALLINFO */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MALLOC_MALLOC_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MALLOC_NP_H */ - -/* Define to 1 if you have the `memmem' function. */ -#define HAVE_MEMMEM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset_s' function. */ -/* #undef HAVE_MEMSET_S */ - -/* Define to 1 if you have the `mlockall' function. */ -#define HAVE_MLOCKALL 1 - -/* Define to 1 if you have the header - file. */ -/* #undef HAVE_NACL_CRYPTO_SCALARMULT_CURVE25519_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NET_PFVAR_H */ - -/* Define to 1 if you have the `pipe' function. */ -#define HAVE_PIPE 1 - -/* Define to 1 if you have the `pipe2' function. */ -/* #undef HAVE_PIPE2 */ - -/* Define to 1 if you have the `prctl' function. */ -#define HAVE_PRCTL 1 - -/* Define to 1 if you have the `pthread_condattr_setclock' function. */ -/* #undef HAVE_PTHREAD_CONDATTR_SETCLOCK */ - -/* Define to 1 if you have the `pthread_create' function. */ -#define HAVE_PTHREAD_CREATE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PTHREAD_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PWD_H 1 - -/* Define to 1 if you have the `readpassphrase' function. */ -/* #undef HAVE_READPASSPHRASE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_READPASSPHRASE_H */ - -/* Define to 1 if you have the `rint' function. */ -/* #undef HAVE_RINT */ - -/* Define to 1 if the system has the type `rlim_t'. */ -#define HAVE_RLIM_T 1 - -/* Define to 1 if you have the `RtlSecureZeroMemory' function. */ -/* #undef HAVE_RTLSECUREZEROMEMORY */ - -/* Define to 1 if the system has the type `sa_family_t'. */ -#define HAVE_SA_FAMILY_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SECCOMP_H */ - -/* Define to 1 if you have the `SecureZeroMemory' function. */ -/* #undef HAVE_SECUREZEROMEMORY */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the `socketpair' function. */ -/* #undef HAVE_SOCKETPAIR */ - -/* Define to 1 if the system has the type `ssize_t'. */ -#define HAVE_SSIZE_T 1 - -/* Define to 1 if you have the `SSL_CIPHER_find' function. */ -/* #undef HAVE_SSL_CIPHER_FIND */ - -/* Define to 1 if you have the `SSL_get_client_ciphers' function. */ -/* #undef HAVE_SSL_GET_CLIENT_CIPHERS */ - -/* Define to 1 if you have the `SSL_get_client_random' function. */ -/* #undef HAVE_SSL_GET_CLIENT_RANDOM */ - -/* Define to 1 if you have the `SSL_get_server_random' function. */ -/* #undef HAVE_SSL_GET_SERVER_RANDOM */ - -/* Define to 1 if you have the `SSL_SESSION_get_master_key' function. */ -/* #undef HAVE_SSL_SESSION_GET_MASTER_KEY */ - -/* Define to 1 if you have the `statvfs' function. */ -#define HAVE_STATVFS 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcat' function. */ -/* #undef HAVE_STRLCAT */ - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strptime' function. */ -#define HAVE_STRPTIME 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoull' function. */ -#define HAVE_STRTOULL 1 - -/* Define to 1 if `min_heap_idx' is a member of `struct event'. */ -/* #undef HAVE_STRUCT_EVENT_MIN_HEAP_IDX */ - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#define HAVE_STRUCT_IN6_ADDR 1 - -/* Define to 1 if `s6_addr16' is a member of `struct in6_addr'. */ -#define HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1 - -/* Define to 1 if `s6_addr32' is a member of `struct in6_addr'. */ -#define HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1 - -/* Define to 1 if the system has the type `struct sockaddr_in6'. */ -#define HAVE_STRUCT_SOCKADDR_IN6 1 - -/* Define to 1 if `sin6_len' is a member of `struct sockaddr_in6'. */ -/* #undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */ - -/* Define to 1 if `sin_len' is a member of `struct sockaddr_in'. */ -/* #undef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ - -/* Define to 1 if `get_cipher_by_char' is a member of `struct ssl_method_st'. - */ -#define HAVE_STRUCT_SSL_METHOD_ST_GET_CIPHER_BY_CHAR 1 - -/* Define to 1 if `tv_sec' is a member of `struct timeval'. */ -#define HAVE_STRUCT_TIMEVAL_TV_SEC 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYSLOG_H 1 - -/* Have systemd */ -/* #undef HAVE_SYSTEMD */ - -/* Have systemd v209 or more */ -/* #undef HAVE_SYSTEMD_209 */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CAPABILITY_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_EVENTFD_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_FILE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_LIMITS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PRCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STATVFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCALL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSLIMITS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UCONTEXT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UN_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UTIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the `timingsafe_memcmp' function. */ -/* #undef HAVE_TIMINGSAFE_MEMCMP */ - -/* Define to 1 if you have the `TLS_method' function. */ -/* #undef HAVE_TLS_METHOD */ - -/* Define to 1 if you have the `truncate' function. */ -#define HAVE_TRUNCATE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UCONTEXT_H 1 - -/* Define to 1 if the system has the type `uint'. */ -#define HAVE_UINT 1 - -/* Define to 1 if you have the `uname' function. */ -#define HAVE_UNAME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `usleep' function. */ -#define HAVE_USLEEP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UTIME_H 1 - -/* Define to 1 if the system has the type `u_char'. */ -#define HAVE_U_CHAR 1 - -/* Define to 1 if you have the `vasprintf' function. */ -#define HAVE_VASPRINTF 1 - -/* Define to 1 if you have the `_NSGetEnviron' function. */ -/* #undef HAVE__NSGETENVIRON */ - -/* Define to 1 if you have the `_vscprintf' function. */ -/* #undef HAVE__VSCPRINTF */ - -/* name of the syslog facility */ -#define LOGFACILITY LOG_DAEMON - -/* Define to 1 iff malloc(0) returns a pointer */ -#define MALLOC_ZERO_WORKS 1 - -/* Define to 1 iff memset(0) sets pointers to NULL */ -#define NULL_REP_IS_ZERO_BYTES 1 - -/* "Define to handle pf on OpenBSD properly" */ -/* #undef OPENBSD */ - -/* Name of package */ -#define PACKAGE "tor" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "tor" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "tor 0.2.9.0-alpha-dev" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "tor" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.2.9.0-alpha-dev" - -/* How to access the PC from a struct ucontext */ -#define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_RIP] - -/* Define to 1 iff right-shifting a negative value performs sign-extension */ -#define RSHIFT_DOES_SIGN_EXTEND 1 - -/* The size of `cell_t', as computed by sizeof. */ -#define SIZEOF_CELL_T 0 - -/* The size of `char', as computed by sizeof. */ -#define SIZEOF_CHAR 1 - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `int16_t', as computed by sizeof. */ -#define SIZEOF_INT16_T 2 - -/* The size of `int32_t', as computed by sizeof. */ -#define SIZEOF_INT32_T 4 - -/* The size of `int64_t', as computed by sizeof. */ -#define SIZEOF_INT64_T 8 - -/* The size of `int8_t', as computed by sizeof. */ -#define SIZEOF_INT8_T 1 - -/* The size of `intptr_t', as computed by sizeof. */ -#define SIZEOF_INTPTR_T 8 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 8 - -/* The size of `long long', as computed by sizeof. */ -#define SIZEOF_LONG_LONG 8 - -/* The size of `pid_t', as computed by sizeof. */ -#define SIZEOF_PID_T 4 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 - -/* The size of `socklen_t', as computed by sizeof. */ -#define SIZEOF_SOCKLEN_T 4 - -/* The size of `time_t', as computed by sizeof. */ -#define SIZEOF_TIME_T 8 - -/* The size of `uint16_t', as computed by sizeof. */ -#define SIZEOF_UINT16_T 2 - -/* The size of `uint32_t', as computed by sizeof. */ -#define SIZEOF_UINT32_T 4 - -/* The size of `uint64_t', as computed by sizeof. */ -#define SIZEOF_UINT64_T 8 - -/* The size of `uint8_t', as computed by sizeof. */ -#define SIZEOF_UINT8_T 1 - -/* The size of `uintptr_t', as computed by sizeof. */ -#define SIZEOF_UINTPTR_T 8 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 8 - -/* The size of `__int64', as computed by sizeof. */ -#define SIZEOF___INT64 0 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Defined if we're going to use Libevent's buffered IO API */ -/* #undef USE_BUFFEREVENTS */ - -/* Defined if we should use an internal curve25519_donna{,_c64} implementation - */ -#define USE_CURVE25519_DONNA 1 - -/* Defined if we should use a curve25519 from nacl */ -/* #undef USE_CURVE25519_NACL */ - -/* Debug memory allocation library */ -/* #undef USE_DMALLOC */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* "Define to enable transparent proxy support" */ -#define USE_TRANSPARENT 1 - -/* Define to 1 iff we represent negative integers with two's complement */ -#define USING_TWOS_COMPLEMENT 1 - -/* Version number of package */ -#define VERSION "0.2.9.0-alpha-dev" - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Enable large inode numbers on Mac OS X 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define on some platforms to activate x_r() functions in time.h */ -/* #undef _REENTRANT */ - - -#ifdef _WIN32 -/* Defined to access windows functions and definitions for >=WinXP */ -# ifndef WINVER -# define WINVER 0x0501 -# endif - -/* Defined to access _other_ windows functions and definitions for >=WinXP */ -# ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 -# endif - -/* Defined to avoid including some windows headers as part of Windows.h */ -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -#endif - diff --git a/src/app/tor/target.mk b/src/app/tor/target.mk deleted file mode 100644 index 1801cde..0000000 --- a/src/app/tor/target.mk +++ /dev/null @@ -1,192 +0,0 @@ -TARGET = tor -LIBS = libevent posix libssl libcrypto zlib -TOR_DIR = $(call select_from_ports,tor)/src/app/tor -INC_DIR = $(PRG_DIR) \ - $(TOR_DIR) \ - $(TOR_DIR)/src \ - $(TOR_DIR)/src/common \ - $(TOR_DIR)/src/ext \ - $(TOR_DIR)/src/ext/trunnel \ - $(TOR_DIR)/src/or \ - $(TOR_DIR)/src/trunnel -CC_OPT += -std=c99 -DOPENSSL_THREADS -DSHARE_DATADIR="\"/share\"" -DLOCALSTATEDIR="\"/tor\"" -DED25519_SUFFIX=_donna - -SRC_C = common/address.c \ - common/aes.c \ - common/backtrace.c \ - common/compat.c \ - common/compat_libevent.c \ - common/compat_pthreads.c \ - common/compat_rust.c \ - common/compat_threads.c \ - common/compat_time.c \ - common/compress.c \ - common/compress_lzma.c \ - common/compress_none.c \ - common/compress_zlib.c \ - common/compress_zstd.c \ - common/confline.c \ - common/container.c \ - common/crypto.c \ - common/crypto_curve25519.c \ - common/crypto_ed25519.c \ - common/crypto_format.c \ - common/crypto_pwbox.c \ - common/crypto_s2k.c \ - common/di_ops.c \ - common/log.c \ - common/memarea.c \ - common/procmon.c \ - common/pubsub.c \ - common/sandbox.c \ - common/storagedir.c \ - common/timers.c \ - common/tortls.c \ - common/util.c \ - common/util_bug.c \ - common/util_format.c \ - common/util_process.c \ - common/workqueue.c \ - ext/csiphash.c \ - ext/ed25519/donna/ed25519_tor.c \ - ext/ed25519/ref10/blinding.c \ - ext/ed25519/ref10/fe_0.c \ - ext/ed25519/ref10/fe_1.c \ - ext/ed25519/ref10/fe_add.c \ - ext/ed25519/ref10/fe_cmov.c \ - ext/ed25519/ref10/fe_copy.c \ - ext/ed25519/ref10/fe_frombytes.c \ - ext/ed25519/ref10/fe_invert.c \ - ext/ed25519/ref10/fe_isnegative.c \ - ext/ed25519/ref10/fe_isnonzero.c \ - ext/ed25519/ref10/fe_mul.c \ - ext/ed25519/ref10/fe_neg.c \ - ext/ed25519/ref10/fe_pow22523.c \ - ext/ed25519/ref10/fe_sq.c \ - ext/ed25519/ref10/fe_sq2.c \ - ext/ed25519/ref10/fe_sub.c \ - ext/ed25519/ref10/fe_tobytes.c \ - ext/ed25519/ref10/ge_add.c \ - ext/ed25519/ref10/ge_double_scalarmult.c \ - ext/ed25519/ref10/ge_frombytes.c \ - ext/ed25519/ref10/ge_madd.c \ - ext/ed25519/ref10/ge_msub.c \ - ext/ed25519/ref10/ge_p1p1_to_p2.c \ - ext/ed25519/ref10/ge_p1p1_to_p3.c \ - ext/ed25519/ref10/ge_p2_0.c \ - ext/ed25519/ref10/ge_p2_dbl.c \ - ext/ed25519/ref10/ge_p3_0.c \ - ext/ed25519/ref10/ge_p3_dbl.c \ - ext/ed25519/ref10/ge_p3_to_cached.c \ - ext/ed25519/ref10/ge_p3_to_p2.c \ - ext/ed25519/ref10/ge_p3_tobytes.c \ - ext/ed25519/ref10/ge_precomp_0.c \ - ext/ed25519/ref10/ge_scalarmult_base.c \ - ext/ed25519/ref10/ge_sub.c \ - ext/ed25519/ref10/ge_tobytes.c \ - ext/ed25519/ref10/keyconv.c \ - ext/ed25519/ref10/keypair.c \ - ext/ed25519/ref10/open.c \ - ext/ed25519/ref10/sc_muladd.c \ - ext/ed25519/ref10/sc_reduce.c \ - ext/ed25519/ref10/sign.c \ - ext/keccak-tiny/keccak-tiny-unrolled.c \ - ext/readpassphrase.c \ - ext/timeouts/timeout.c \ - ext/trunnel/trunnel.c \ - or/addressmap.c \ - or/bridges.c \ - or/bridges.c \ - or/buffers.c \ - or/channel.c \ - or/channelpadding.c \ - or/channelpadding.c \ - or/channeltls.c \ - or/circpathbias.c \ - or/circuitbuild.c \ - or/circuitlist.c \ - or/circuitmux.c \ - or/circuitmux_ewma.c \ - or/circuitstats.c \ - or/circuituse.c \ - or/command.c \ - or/config.c \ - or/confparse.c \ - or/connection.c \ - or/connection_edge.c \ - or/connection_or.c \ - or/conscache.c \ - or/consdiff.c \ - or/consdiffmgr.c \ - or/control.c \ - or/cpuworker.c \ - or/dircollate.c \ - or/directory.c \ - or/dirserv.c \ - or/dirvote.c \ - or/dns.c \ - or/dnsserv.c \ - or/entrynodes.c \ - or/ext_orport.c \ - or/fp_pair.c \ - or/geoip.c \ - or/hibernate.c \ - or/hs_cache.c \ - or/hs_circuitmap.c \ - or/hs_common.c \ - or/hs_descriptor.c \ - or/hs_intropoint.c \ - or/hs_ntor.c \ - or/hs_service.c \ - or/keypin.c \ - or/main.c \ - or/microdesc.c \ - or/networkstatus.c \ - or/nodelist.c \ - or/onion.c \ - or/onion_fast.c \ - or/onion_ntor.c \ - or/onion_tap.c \ - or/parsecommon.c \ - or/periodic.c \ - or/policies.c \ - or/protover.c \ - or/reasons.c \ - or/relay.c \ - or/rendcache.c \ - or/rendclient.c \ - or/rendcommon.c \ - or/rendmid.c \ - or/rendservice.c \ - or/rephist.c \ - or/replaycache.c \ - or/router.c \ - or/routerkeys.c \ - or/routerlist.c \ - or/routerparse.c \ - or/routerset.c \ - or/scheduler.c \ - or/shared_random.c \ - or/shared_random_state.c \ - or/statefile.c \ - or/status.c \ - or/tor_main.c \ - or/torcert.c \ - or/transports.c \ - trunnel/channelpadding_negotiation.c \ - trunnel/ed25519_cert.c \ - trunnel/hs/cell_common.c \ - trunnel/hs/cell_establish_intro.c \ - trunnel/hs/cell_introduce1.c \ - trunnel/link_handshake.c \ - trunnel/pwbox.c - -ifeq ($(filter-out $(SPECS),64bit),) -SRC_C += ext/curve25519_donna/curve25519-donna-c64.c -else -SRC_C += ext/curve25519_donna/curve25519-donna.c -endif # 64bit - -vpath %.c $(TOR_DIR)/src - -CC_CXX_WARN_STRICT =