Run rectify_include_paths.py

This commit is contained in:
Nick Mathewson 2018-06-20 09:35:05 -04:00
parent 257b280776
commit 0dab29ce10
410 changed files with 3487 additions and 3488 deletions

View File

@ -18,7 +18,8 @@ bin_SCRIPTS=
AM_CPPFLAGS=\
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/ext \
-I$(top_srcdir)/src/ext/trunnel
-I$(top_srcdir)/src/ext/trunnel \
-I$(top_srcdir)/src/trunnel
AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@ @TOR_LZMA_CFLAGS@ @TOR_ZSTD_CFLAGS@
SHELL=@SHELL@

View File

@ -46,7 +46,7 @@ def fix_includes(inp, out, mapping):
incs = get_include_map()
for dirpath,dirnames,fnames in os.walk("src"):
exclude(["ext", "trunnel"], dirnames)
exclude(["trunnel"], dirnames)
for fname in fnames:
if fname.endswith(".c") or fname.endswith(".h"):

View File

@ -35,13 +35,13 @@
#include <iphlpapi.h>
#endif /* defined(_WIN32) */
#include "compat.h"
#include "util.h"
#include "util_format.h"
#include "address.h"
#include "torlog.h"
#include "container.h"
#include "sandbox.h"
#include "common/compat.h"
#include "common/util.h"
#include "common/util_format.h"
#include "common/address.h"
#include "common/torlog.h"
#include "common/container.h"
#include "common/sandbox.h"
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>

View File

@ -13,9 +13,9 @@
//#include <sys/sockio.h>
#include "orconfig.h"
#include "torint.h"
#include "compat.h"
#include "container.h"
#include "common/torint.h"
#include "common/compat.h"
#include "common/container.h"
#ifdef ADDRESS_PRIVATE

View File

@ -11,12 +11,12 @@
**/
#include "orconfig.h"
#include "address_set.h"
#include "address.h"
#include "compat.h"
#include "container.h"
#include "crypto_rand.h"
#include "util.h"
#include "common/address_set.h"
#include "common/address.h"
#include "common/compat.h"
#include "common/container.h"
#include "common/crypto_rand.h"
#include "common/util.h"
#include "siphash.h"
/** How many 64-bit siphash values to extract per address */

View File

@ -14,7 +14,7 @@
#define TOR_ADDRESS_SET_H
#include "orconfig.h"
#include "torint.h"
#include "common/torint.h"
/**
* An address_set_t represents a set of tor_addr_t values. The implementation

View File

@ -16,9 +16,9 @@
#include <ws2tcpip.h>
#endif
#include "compat_openssl.h"
#include "common/compat_openssl.h"
#include <openssl/opensslv.h>
#include "crypto_openssl_mgt.h"
#include "common/crypto_openssl_mgt.h"
#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,0,0)
#error "We require OpenSSL >= 1.0.0"
@ -36,11 +36,11 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
#include "compat.h"
#include "aes.h"
#include "util.h"
#include "torlog.h"
#include "di_ops.h"
#include "common/compat.h"
#include "common/aes.h"
#include "common/util.h"
#include "common/torlog.h"
#include "common/di_ops.h"
#ifdef ANDROID
/* Android's OpenSSL seems to have removed all of its Engine support. */

View File

@ -14,9 +14,9 @@
*/
#include "orconfig.h"
#include "compat.h"
#include "util.h"
#include "torlog.h"
#include "common/compat.h"
#include "common/util.h"
#include "common/torlog.h"
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
@ -40,7 +40,7 @@
#endif /* defined(HAVE_CYGWIN_SIGNAL_H) || ... */
#define EXPOSE_CLEAN_BACKTRACE
#include "backtrace.h"
#include "common/backtrace.h"
#if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \
defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION)

View File

@ -21,12 +21,12 @@
#define BUFFERS_PRIVATE
#include "orconfig.h"
#include <stddef.h>
#include "buffers.h"
#include "compat.h"
#include "compress.h"
#include "util.h"
#include "torint.h"
#include "torlog.h"
#include "common/buffers.h"
#include "common/compat.h"
#include "common/compress.h"
#include "common/util.h"
#include "common/torint.h"
#include "common/torlog.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

View File

@ -12,9 +12,9 @@
#ifndef TOR_BUFFERS_H
#define TOR_BUFFERS_H
#include "compat.h"
#include "torint.h"
#include "testsupport.h"
#include "common/compat.h"
#include "common/torint.h"
#include "common/testsupport.h"
typedef struct buf_t buf_t;

View File

@ -7,14 +7,14 @@
#define BUFFERS_PRIVATE
#include "orconfig.h"
#include <stddef.h>
#include "buffers.h"
#include "buffers_tls.h"
#include "compat.h"
#include "compress.h"
#include "util.h"
#include "torint.h"
#include "torlog.h"
#include "tortls.h"
#include "common/buffers.h"
#include "common/buffers_tls.h"
#include "common/compat.h"
#include "common/compress.h"
#include "common/util.h"
#include "common/torint.h"
#include "common/torlog.h"
#include "common/tortls.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

View File

@ -13,7 +13,7 @@
**/
#define COMPAT_PRIVATE
#include "compat.h"
#include "common/compat.h"
#ifdef _WIN32
#include <winsock2.h>
@ -125,11 +125,11 @@ SecureZeroMemory(PVOID ptr, SIZE_T cnt)
#include <sys/file.h>
#endif
#include "torlog.h"
#include "util.h"
#include "container.h"
#include "address.h"
#include "sandbox.h"
#include "common/torlog.h"
#include "common/util.h"
#include "common/container.h"
#include "common/address.h"
#include "common/sandbox.h"
/* Inline the strl functions if the platform doesn't have them. */
#ifndef HAVE_STRLCPY

View File

@ -14,8 +14,8 @@
#define SIO_IDEAL_SEND_BACKLOG_QUERY 0x4004747b
#endif
#endif
#include "torint.h"
#include "testsupport.h"
#include "common/torint.h"
#include "common/testsupport.h"
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
@ -45,7 +45,7 @@
#include <netinet6/in6.h>
#endif
#include "compat_time.h"
#include "common/compat_time.h"
#if defined(__has_feature)
# if __has_feature(address_sanitizer)
@ -751,7 +751,7 @@ STATIC int tor_ersatz_socketpair(int family, int type, int protocol,
ssize_t tor_getpass(const char *prompt, char *output, size_t buflen);
/* This needs some of the declarations above so we include it here. */
#include "compat_threads.h"
#include "common/compat_threads.h"
#endif /* !defined(TOR_COMPAT_H) */

View File

@ -7,14 +7,14 @@
*/
#include "orconfig.h"
#include "compat.h"
#include "common/compat.h"
#define COMPAT_LIBEVENT_PRIVATE
#include "compat_libevent.h"
#include "common/compat_libevent.h"
#include "crypto_rand.h"
#include "common/crypto_rand.h"
#include "util.h"
#include "torlog.h"
#include "common/util.h"
#include "common/torlog.h"
#include <event2/event.h>
#include <event2/thread.h>

View File

@ -5,7 +5,7 @@
#define TOR_COMPAT_LIBEVENT_H
#include "orconfig.h"
#include "testsupport.h"
#include "common/testsupport.h"
void configure_libevent_logging(void);
void suppress_libevent_log_msg(const char *msg);

View File

@ -8,7 +8,7 @@
#define TOR_COMPAT_OPENSSL_H
#include <openssl/opensslv.h>
#include "crypto_openssl_mgt.h"
#include "common/crypto_openssl_mgt.h"
/**
* \file compat_openssl.h

View File

@ -15,9 +15,9 @@
#include <signal.h>
#include <time.h>
#include "compat.h"
#include "torlog.h"
#include "util.h"
#include "common/compat.h"
#include "common/torlog.h"
#include "common/util.h"
/** Wraps a void (*)(void*) function and its argument so we can
* invoke them in a way pthreads would expect.

View File

@ -13,11 +13,11 @@
#include "orconfig.h"
#include <stdlib.h>
#include "compat.h"
#include "compat_threads.h"
#include "common/compat.h"
#include "common/compat_threads.h"
#include "util.h"
#include "torlog.h"
#include "common/util.h"
#include "common/torlog.h"
#ifdef HAVE_SYS_EVENTFD_H
#include <sys/eventfd.h>

View File

@ -7,8 +7,8 @@
#define TOR_COMPAT_THREADS_H
#include "orconfig.h"
#include "torint.h"
#include "testsupport.h"
#include "common/torint.h"
#include "common/testsupport.h"
#if defined(HAVE_PTHREAD_H) && !defined(_WIN32)
#include <pthread.h>

View File

@ -10,7 +10,7 @@
**/
#define COMPAT_TIME_PRIVATE
#include "compat.h"
#include "common/compat.h"
#ifdef _WIN32
#include <winsock2.h>
@ -34,9 +34,9 @@
#include <mach/mach_time.h>
#endif
#include "torlog.h"
#include "util.h"
#include "container.h"
#include "common/torlog.h"
#include "common/util.h"
#include "common/container.h"
#ifndef HAVE_GETTIMEOFDAY
#ifdef HAVE_FTIME

View File

@ -12,12 +12,12 @@
#ifdef _WIN32
#include "compat.h"
#include "common/compat.h"
#include <windows.h>
#include <process.h>
#include "util.h"
#include "container.h"
#include "torlog.h"
#include "common/util.h"
#include "common/container.h"
#include "common/torlog.h"
/* This value is more or less total cargo-cult */
#define SPIN_COUNT 2000

View File

@ -14,19 +14,19 @@
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include "torint.h"
#include "common/torint.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include "util.h"
#include "torlog.h"
#include "compress.h"
#include "compress_lzma.h"
#include "compress_none.h"
#include "compress_zlib.h"
#include "compress_zstd.h"
#include "common/util.h"
#include "common/torlog.h"
#include "common/compress.h"
#include "common/compress_lzma.h"
#include "common/compress_none.h"
#include "common/compress_zlib.h"
#include "common/compress_zstd.h"
/** Total number of bytes allocated for compression state overhead. */
static atomic_counter_t total_compress_allocation;

View File

@ -13,10 +13,10 @@
#include "orconfig.h"
#include "util.h"
#include "torlog.h"
#include "compress.h"
#include "compress_lzma.h"
#include "common/util.h"
#include "common/torlog.h"
#include "common/compress.h"
#include "common/compress_lzma.h"
#ifdef HAVE_LZMA
#include <lzma.h>

View File

@ -16,10 +16,10 @@
#include "orconfig.h"
#include "util.h"
#include "torlog.h"
#include "compress.h"
#include "compress_none.h"
#include "common/util.h"
#include "common/torlog.h"
#include "common/compress.h"
#include "common/compress_none.h"
/** Transfer some bytes using the identity transformation. Read up to
* *<b>in_len</b> bytes from *<b>in</b>, and write up to *<b>out_len</b> bytes

View File

@ -13,10 +13,10 @@
#include "orconfig.h"
#include "util.h"
#include "torlog.h"
#include "compress.h"
#include "compress_zlib.h"
#include "common/util.h"
#include "common/torlog.h"
#include "common/compress.h"
#include "common/compress_zlib.h"
/* zlib 1.2.4 and 1.2.5 do some "clever" things with macros. Instead of
saying "(defined(FOO) ? FOO : 0)" they like to say "FOO-0", on the theory

View File

@ -13,10 +13,10 @@
#include "orconfig.h"
#include "util.h"
#include "torlog.h"
#include "compress.h"
#include "compress_zstd.h"
#include "common/util.h"
#include "common/torlog.h"
#include "common/compress.h"
#include "common/compress_zstd.h"
#ifdef ENABLE_ZSTD_ADVANCED_APIS
/* This is a lie, but we make sure it doesn't get us in trouble by wrapping

View File

@ -4,11 +4,11 @@
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "compat.h"
#include "confline.h"
#include "torlog.h"
#include "util.h"
#include "container.h"
#include "common/compat.h"
#include "common/confline.h"
#include "common/torlog.h"
#include "common/util.h"
#include "common/container.h"
static int config_get_lines_aux(const char *string, config_line_t **result,
int extended, int allow_include,

View File

@ -7,7 +7,7 @@
#ifndef TOR_CONFLINE_H
#define TOR_CONFLINE_H
#include "container.h"
#include "common/container.h"
/** Ordinary configuration line. */
#define CONFIG_LINE_NORMAL 0

View File

@ -11,11 +11,11 @@
* a digest-to-void* map.
**/
#include "compat.h"
#include "util.h"
#include "torlog.h"
#include "container.h"
#include "crypto_digest.h"
#include "common/compat.h"
#include "common/util.h"
#include "common/torlog.h"
#include "common/container.h"
#include "common/crypto_digest.h"
#include <stdlib.h>
#include <string.h>

View File

@ -6,7 +6,7 @@
#ifndef TOR_CONTAINER_H
#define TOR_CONTAINER_H
#include "util.h"
#include "common/util.h"
#include "siphash.h"
/** A resizeable list of pointers, with associated helpful functionality.

View File

@ -23,16 +23,16 @@
#endif /* defined(_WIN32) */
#define CRYPTO_PRIVATE
#include "compat_openssl.h"
#include "crypto.h"
#include "crypto_curve25519.h"
#include "crypto_digest.h"
#include "crypto_dh.h"
#include "crypto_ed25519.h"
#include "crypto_format.h"
#include "crypto_rand.h"
#include "crypto_rsa.h"
#include "crypto_util.h"
#include "common/compat_openssl.h"
#include "common/crypto.h"
#include "common/crypto_curve25519.h"
#include "common/crypto_digest.h"
#include "common/crypto_dh.h"
#include "common/crypto_ed25519.h"
#include "common/crypto_format.h"
#include "common/crypto_rand.h"
#include "common/crypto_rsa.h"
#include "common/crypto_util.h"
DISABLE_GCC_WARNING(redundant-decls)
@ -62,14 +62,14 @@ ENABLE_GCC_WARNING(redundant-decls)
#include <unistd.h>
#endif
#include "torlog.h"
#include "torint.h"
#include "aes.h"
#include "util.h"
#include "container.h"
#include "compat.h"
#include "sandbox.h"
#include "util_format.h"
#include "common/torlog.h"
#include "common/torint.h"
#include "common/aes.h"
#include "common/util.h"
#include "common/container.h"
#include "common/compat.h"
#include "common/sandbox.h"
#include "common/util_format.h"
#include "keccak-tiny/keccak-tiny.h"

View File

@ -16,10 +16,10 @@
#include "orconfig.h"
#include <stdio.h>
#include "torint.h"
#include "compat.h"
#include "util.h"
#include "crypto_rsa.h"
#include "common/torint.h"
#include "common/compat.h"
#include "common/util.h"
#include "common/crypto_rsa.h"
/** Length of our symmetric cipher's keys of 128-bit. */
#define CIPHER_KEY_LEN 16

View File

@ -20,14 +20,14 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#include "container.h"
#include "crypto_curve25519.h"
#include "crypto_digest.h"
#include "crypto_format.h"
#include "crypto_rand.h"
#include "crypto_util.h"
#include "util.h"
#include "torlog.h"
#include "common/container.h"
#include "common/crypto_curve25519.h"
#include "common/crypto_digest.h"
#include "common/crypto_format.h"
#include "common/crypto_rand.h"
#include "common/crypto_util.h"
#include "common/util.h"
#include "common/torlog.h"
#include "ed25519/donna/ed25519_donna_tor.h"

View File

@ -4,10 +4,10 @@
#ifndef TOR_CRYPTO_CURVE25519_H
#define TOR_CRYPTO_CURVE25519_H
#include "testsupport.h"
#include "torint.h"
#include "crypto_digest.h"
#include "crypto_openssl_mgt.h"
#include "common/testsupport.h"
#include "common/torint.h"
#include "common/crypto_digest.h"
#include "common/crypto_openssl_mgt.h"
/** Length of a curve25519 public key when encoded. */
#define CURVE25519_PUBKEY_LEN 32

View File

@ -9,11 +9,11 @@
* \brief Block of functions related with DH utilities and operations.
**/
#include "compat_openssl.h"
#include "crypto_dh.h"
#include "crypto_digest.h"
#include "crypto_hkdf.h"
#include "crypto_util.h"
#include "common/compat_openssl.h"
#include "common/crypto_dh.h"
#include "common/crypto_digest.h"
#include "common/crypto_hkdf.h"
#include "common/crypto_util.h"
DISABLE_GCC_WARNING(redundant-decls)
@ -21,7 +21,7 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
#include "torlog.h"
#include "common/torlog.h"
/** A structure to hold the first half (x, g^x) of a Diffie-Hellman handshake
* while we're waiting for the second.*/

View File

@ -13,7 +13,7 @@
#ifndef TOR_CRYPTO_DH_H
#define TOR_CRYPTO_DH_H
#include "util.h"
#include "common/util.h"
/** Length of our DH keys. */
#define DH_BYTES (1024/8)

View File

@ -10,11 +10,11 @@
* operations.
**/
#include "container.h"
#include "crypto_digest.h"
#include "crypto_openssl_mgt.h"
#include "crypto_util.h"
#include "torlog.h"
#include "common/container.h"
#include "common/crypto_digest.h"
#include "common/crypto_openssl_mgt.h"
#include "common/crypto_util.h"
#include "common/torlog.h"
#include "keccak-tiny/keccak-tiny.h"

View File

@ -15,8 +15,8 @@
#include <stdio.h>
#include "container.h"
#include "torint.h"
#include "common/container.h"
#include "common/torint.h"
/** Length of the output of our message digest. */
#define DIGEST_LEN 20

View File

@ -21,15 +21,15 @@
#include <sys/stat.h>
#endif
#include "crypto_curve25519.h"
#include "crypto_digest.h"
#include "crypto_ed25519.h"
#include "crypto_format.h"
#include "crypto_rand.h"
#include "crypto_util.h"
#include "torlog.h"
#include "util.h"
#include "util_format.h"
#include "common/crypto_curve25519.h"
#include "common/crypto_digest.h"
#include "common/crypto_ed25519.h"
#include "common/crypto_format.h"
#include "common/crypto_rand.h"
#include "common/crypto_util.h"
#include "common/torlog.h"
#include "common/util.h"
#include "common/util_format.h"
#include "ed25519/ref10/ed25519_ref10.h"
#include "ed25519/donna/ed25519_donna_tor.h"

View File

@ -4,10 +4,10 @@
#ifndef TOR_CRYPTO_ED25519_H
#define TOR_CRYPTO_ED25519_H
#include "testsupport.h"
#include "torint.h"
#include "crypto_curve25519.h"
#include "util.h"
#include "common/testsupport.h"
#include "common/torint.h"
#include "common/crypto_curve25519.h"
#include "common/util.h"
#define ED25519_PUBKEY_LEN 32
#define ED25519_SECKEY_LEN 64

View File

@ -14,15 +14,15 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#include "container.h"
#include "crypto_curve25519.h"
#include "crypto_digest.h"
#include "crypto_ed25519.h"
#include "crypto_format.h"
#include "crypto_util.h"
#include "util.h"
#include "util_format.h"
#include "torlog.h"
#include "common/container.h"
#include "common/crypto_curve25519.h"
#include "common/crypto_digest.h"
#include "common/crypto_ed25519.h"
#include "common/crypto_format.h"
#include "common/crypto_util.h"
#include "common/util.h"
#include "common/util_format.h"
#include "common/torlog.h"
/** Write the <b>datalen</b> bytes from <b>data</b> to the file named
* <b>fname</b> in the tagged-data format. This format contains a

View File

@ -7,9 +7,9 @@
#ifndef TOR_CRYPTO_FORMAT_H
#define TOR_CRYPTO_FORMAT_H
#include "testsupport.h"
#include "torint.h"
#include "crypto_ed25519.h"
#include "common/testsupport.h"
#include "common/torint.h"
#include "common/crypto_ed25519.h"
int crypto_write_tagged_contents_to_file(const char *fname,
const char *typestring,

View File

@ -9,9 +9,9 @@
* \brief Block of functions related with HKDF utilities and operations.
**/
#include "crypto_hkdf.h"
#include "crypto_util.h"
#include "crypto_digest.h"
#include "common/crypto_hkdf.h"
#include "common/crypto_util.h"
#include "common/crypto_digest.h"
/** Given <b>key_in_len</b> bytes of negotiated randomness in <b>key_in</b>
* ("K"), expand it into <b>key_out_len</b> bytes of negotiated key material in

View File

@ -13,7 +13,7 @@
#ifndef TOR_CRYPTO_HKDF_H
#define TOR_CRYPTO_HKDF_H
#include "util.h"
#include "common/util.h"
int crypto_expand_key_material_TAP(const uint8_t *key_in,
size_t key_in_len,

View File

@ -10,8 +10,8 @@
* \brief Block of functions related to operations from OpenSSL.
**/
#include "compat_openssl.h"
#include "crypto_openssl_mgt.h"
#include "common/compat_openssl.h"
#include "common/crypto_openssl_mgt.h"
DISABLE_GCC_WARNING(redundant-decls)

View File

@ -14,7 +14,7 @@
#define TOR_CRYPTO_OPENSSL_H
#include <stdio.h>
#include "util.h"
#include "common/util.h"
#include <openssl/engine.h>

View File

@ -8,15 +8,15 @@
* them to disk.
*/
#include "crypto.h"
#include "crypto_digest.h"
#include "crypto_pwbox.h"
#include "crypto_rand.h"
#include "crypto_s2k.h"
#include "crypto_util.h"
#include "di_ops.h"
#include "util.h"
#include "pwbox.h"
#include "common/crypto.h"
#include "common/crypto_digest.h"
#include "common/crypto_pwbox.h"
#include "common/crypto_rand.h"
#include "common/crypto_s2k.h"
#include "common/crypto_util.h"
#include "common/di_ops.h"
#include "common/util.h"
#include "trunnel/pwbox.h"
/* 8 bytes "TORBOX00"
1 byte: header len (H)

View File

@ -4,7 +4,7 @@
#ifndef CRYPTO_PWBOX_H_INCLUDED_
#define CRYPTO_PWBOX_H_INCLUDED_
#include "torint.h"
#include "common/torint.h"
#define UNPWBOX_OKAY 0
#define UNPWBOX_BAD_SECRET -1

View File

@ -14,22 +14,22 @@
#ifndef CRYPTO_RAND_PRIVATE
#define CRYPTO_RAND_PRIVATE
#include "crypto_rand.h"
#include "common/crypto_rand.h"
#ifdef _WIN32
#include <windows.h>
#include <wincrypt.h>
#endif /* defined(_WIN32) */
#include "container.h"
#include "compat.h"
#include "compat_openssl.h"
#include "crypto_util.h"
#include "sandbox.h"
#include "testsupport.h"
#include "torlog.h"
#include "util.h"
#include "util_format.h"
#include "common/container.h"
#include "common/compat.h"
#include "common/compat_openssl.h"
#include "common/crypto_util.h"
#include "common/sandbox.h"
#include "common/testsupport.h"
#include "common/torlog.h"
#include "common/util.h"
#include "common/util_format.h"
DISABLE_GCC_WARNING(redundant-decls)
#include <openssl/rand.h>

View File

@ -13,8 +13,8 @@
#ifndef TOR_CRYPTO_RAND_H
#define TOR_CRYPTO_RAND_H
#include "torint.h"
#include "util.h"
#include "common/torint.h"
#include "common/util.h"
/* random numbers */
int crypto_seed_rng(void) ATTR_WUR;

View File

@ -9,14 +9,14 @@
* \brief Block of functions related with RSA utilities and operations.
**/
#include "crypto.h"
#include "crypto_curve25519.h"
#include "crypto_digest.h"
#include "crypto_format.h"
#include "compat_openssl.h"
#include "crypto_rand.h"
#include "crypto_rsa.h"
#include "crypto_util.h"
#include "common/crypto.h"
#include "common/crypto_curve25519.h"
#include "common/crypto_digest.h"
#include "common/crypto_format.h"
#include "common/compat_openssl.h"
#include "common/crypto_rand.h"
#include "common/crypto_rsa.h"
#include "common/crypto_util.h"
DISABLE_GCC_WARNING(redundant-decls)
@ -33,9 +33,9 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
#include "torlog.h"
#include "util.h"
#include "util_format.h"
#include "common/torlog.h"
#include "common/util.h"
#include "common/util_format.h"
/** Declaration for crypto_pk_t structure. */
struct crypto_pk_t

View File

@ -15,13 +15,13 @@
#include "orconfig.h"
#include "crypto_digest.h"
#include "common/crypto_digest.h"
#include <stdio.h>
#include "torint.h"
#include "testsupport.h"
#include "compat.h"
#include "util.h"
#include "torlog.h"
#include "common/torint.h"
#include "common/testsupport.h"
#include "common/compat.h"
#include "common/util.h"
#include "common/torlog.h"
/** Length of our public keys. */
#define PK_BYTES (1024/8)

View File

@ -12,14 +12,14 @@
#define CRYPTO_S2K_PRIVATE
#include "compat.h"
#include "crypto.h"
#include "crypto_digest.h"
#include "crypto_hkdf.h"
#include "crypto_rand.h"
#include "crypto_s2k.h"
#include "crypto_util.h"
#include "util.h"
#include "common/compat.h"
#include "common/crypto.h"
#include "common/crypto_digest.h"
#include "common/crypto_hkdf.h"
#include "common/crypto_rand.h"
#include "common/crypto_s2k.h"
#include "common/crypto_util.h"
#include "common/util.h"
#include <openssl/evp.h>

View File

@ -8,7 +8,7 @@
#define TOR_CRYPTO_S2K_H_INCLUDED
#include <stdio.h>
#include "torint.h"
#include "common/torint.h"
/** Length of RFC2440-style S2K specifier: the first 8 bytes are a salt, the
* 9th describes how much iteration to do. */

View File

@ -13,7 +13,7 @@
#ifndef CRYPTO_UTIL_PRIVATE
#define CRYPTO_UTIL_PRIVATE
#include "crypto_util.h"
#include "common/crypto_util.h"
#include <string.h>
@ -23,7 +23,7 @@
#include <wincrypt.h>
#endif /* defined(_WIN32) */
#include "util.h"
#include "common/util.h"
DISABLE_GCC_WARNING(redundant-decls)
@ -32,7 +32,7 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
#include "torlog.h"
#include "common/torlog.h"
/**
* Destroy the <b>sz</b> bytes of data stored at <b>mem</b>, setting them to

View File

@ -13,7 +13,7 @@
#ifndef TOR_CRYPTO_UTIL_H
#define TOR_CRYPTO_UTIL_H
#include "torint.h"
#include "common/torint.h"
/** OpenSSL-based utility functions. */
void memwipe(void *mem, uint8_t byte, size_t sz);

View File

@ -7,9 +7,9 @@
**/
#include "orconfig.h"
#include "di_ops.h"
#include "torlog.h"
#include "util.h"
#include "common/di_ops.h"
#include "common/torlog.h"
#include "common/util.h"
/**
* Timing-safe version of memcmp. As memcmp, compare the <b>sz</b> bytes at

View File

@ -12,7 +12,7 @@
#define TOR_DI_OPS_H
#include "orconfig.h"
#include "torint.h"
#include "common/torint.h"
int tor_memcmp(const void *a, const void *b, size_t sz);
int tor_memeq(const void *a, const void *b, size_t sz);

View File

@ -51,7 +51,7 @@
#include "orconfig.h"
#include "tor_queue.h"
#include "util.h"
#include "common/util.h"
#define HANDLE_ENTRY(name, structname) \
struct name ## _handle_head_t *handle_head

View File

@ -30,11 +30,11 @@
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include "compat.h"
#include "util.h"
#include "common/compat.h"
#include "common/util.h"
#define LOG_PRIVATE
#include "torlog.h"
#include "container.h"
#include "common/torlog.h"
#include "common/container.h"
#ifdef HAVE_ANDROID_LOG_H
#include <android/log.h>
#endif // HAVE_ANDROID_LOG_H.

View File

@ -9,11 +9,11 @@
#include "orconfig.h"
#include <stddef.h>
#include <stdlib.h>
#include "memarea.h"
#include "util.h"
#include "compat.h"
#include "torlog.h"
#include "container.h"
#include "common/memarea.h"
#include "common/util.h"
#include "common/compat.h"
#include "common/torlog.h"
#include "common/container.h"
#ifndef DISABLE_MEMORY_SENTINELS

View File

@ -6,9 +6,9 @@
* \brief Process-termination monitor functions
**/
#include "procmon.h"
#include "common/procmon.h"
#include "util.h"
#include "common/util.h"
#ifdef HAVE_SIGNAL_H
#include <signal.h>

View File

@ -9,10 +9,10 @@
#ifndef TOR_PROCMON_H
#define TOR_PROCMON_H
#include "compat.h"
#include "compat_libevent.h"
#include "common/compat.h"
#include "common/compat_libevent.h"
#include "torlog.h"
#include "common/torlog.h"
typedef struct tor_process_monitor_t tor_process_monitor_t;

View File

@ -8,8 +8,8 @@
*/
#include "orconfig.h"
#include "pubsub.h"
#include "container.h"
#include "common/pubsub.h"
#include "common/container.h"
/** Helper: insert <b>s</b> into <b>topic's</b> list of subscribers, keeping
* them sorted in priority order. */

View File

@ -42,7 +42,7 @@
#ifndef TOR_PUBSUB_H
#define TOR_PUBSUB_H
#include "torint.h"
#include "common/torint.h"
/**
* Flag for T_subscribe: die with an assertion failure if the event

View File

@ -32,11 +32,11 @@
#include <string.h>
#include <stdlib.h>
#include "sandbox.h"
#include "container.h"
#include "torlog.h"
#include "torint.h"
#include "util.h"
#include "common/sandbox.h"
#include "common/container.h"
#include "common/torlog.h"
#include "common/torint.h"
#include "common/util.h"
#include "tor_queue.h"
#include "ht.h"
@ -79,7 +79,7 @@
defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION)
#define USE_BACKTRACE
#define EXPOSE_CLEAN_BACKTRACE
#include "backtrace.h"
#include "common/backtrace.h"
#endif /* defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && ... */
#ifdef USE_BACKTRACE

View File

@ -13,7 +13,7 @@
#define SANDBOX_H_
#include "orconfig.h"
#include "torint.h"
#include "common/torint.h"
#ifndef SYS_SECCOMP

View File

@ -1,14 +1,14 @@
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "container.h"
#include "compat.h"
#include "confline.h"
#include "memarea.h"
#include "sandbox.h"
#include "storagedir.h"
#include "torlog.h"
#include "util.h"
#include "common/container.h"
#include "common/compat.h"
#include "common/confline.h"
#include "common/memarea.h"
#include "common/sandbox.h"
#include "common/storagedir.h"
#include "common/torlog.h"
#include "common/util.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>

View File

@ -31,11 +31,11 @@
#define TOR_TIMERS_PRIVATE
#include "compat.h"
#include "compat_libevent.h"
#include "timers.h"
#include "torlog.h"
#include "util.h"
#include "common/compat.h"
#include "common/compat_libevent.h"
#include "common/timers.h"
#include "common/torlog.h"
#include "common/util.h"
struct timeout_cb {
timer_cb_fn_t cb;

View File

@ -5,7 +5,7 @@
#define TOR_TIMERS_H
#include "orconfig.h"
#include "testsupport.h"
#include "common/testsupport.h"
struct monotime_t;
typedef struct timeout tor_timer_t;

View File

@ -18,8 +18,8 @@
#define TOKEN_BUCKET_PRIVATE
#include "token_bucket.h"
#include "util_bug.h"
#include "common/token_bucket.h"
#include "common/util_bug.h"
/**
* Set the <b>rate</b> and <b>burst</b> value in a token_bucket_cfg.

View File

@ -9,8 +9,8 @@
#ifndef TOR_TOKEN_BUCKET_H
#define TOR_TOKEN_BUCKET_H
#include "torint.h"
#include "testsupport.h"
#include "common/torint.h"
#include "common/testsupport.h"
/** Largest allowable burst value for a token buffer. */
#define TOKEN_BUCKET_MAX_BURST INT32_MAX

View File

@ -12,8 +12,8 @@
#ifndef TOR_TORLOG_H
#include "compat.h"
#include "testsupport.h"
#include "common/compat.h"
#include "common/testsupport.h"
#ifdef HAVE_SYSLOG_H
#include <syslog.h>

View File

@ -25,11 +25,11 @@
#include <ws2tcpip.h>
#endif
#include "crypto.h"
#include "crypto_rand.h"
#include "crypto_dh.h"
#include "crypto_util.h"
#include "compat.h"
#include "common/crypto.h"
#include "common/crypto_rand.h"
#include "common/crypto_dh.h"
#include "common/crypto_util.h"
#include "common/compat.h"
/* Some versions of OpenSSL declare SSL_get_selected_srtp_profile twice in
* srtp.h. Suppress the GCC warning so we can build with -Wredundant-decl. */
@ -53,10 +53,10 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
#define TORTLS_PRIVATE
#include "tortls.h"
#include "util.h"
#include "torlog.h"
#include "container.h"
#include "common/tortls.h"
#include "common/util.h"
#include "common/torlog.h"
#include "common/container.h"
#include <string.h>
#ifdef OPENSSL_1_1_API

View File

@ -11,10 +11,10 @@
* \brief Headers for tortls.c
**/
#include "crypto_rsa.h"
#include "compat_openssl.h"
#include "compat.h"
#include "testsupport.h"
#include "common/crypto_rsa.h"
#include "common/compat_openssl.h"
#include "common/compat.h"
#include "common/testsupport.h"
/* Opaque structure to hold a TLS connection. */
typedef struct tor_tls_t tor_tls_t;

View File

@ -14,16 +14,16 @@
#include <fcntl.h>
#endif
#define UTIL_PRIVATE
#include "util.h"
#include "torlog.h"
#include "crypto_digest.h"
#include "torint.h"
#include "container.h"
#include "address.h"
#include "sandbox.h"
#include "backtrace.h"
#include "util_process.h"
#include "util_format.h"
#include "common/util.h"
#include "common/torlog.h"
#include "common/crypto_digest.h"
#include "common/torint.h"
#include "common/container.h"
#include "common/address.h"
#include "common/sandbox.h"
#include "common/backtrace.h"
#include "common/util_process.h"
#include "common/util_format.h"
#ifdef _WIN32
#include <io.h>

View File

@ -12,17 +12,17 @@
#define TOR_UTIL_H
#include "orconfig.h"
#include "torint.h"
#include "compat.h"
#include "di_ops.h"
#include "testsupport.h"
#include "common/torint.h"
#include "common/compat.h"
#include "common/di_ops.h"
#include "common/testsupport.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32
/* for the correct alias to struct stat */
#include <sys/stat.h>
#endif
#include "util_bug.h"
#include "common/util_bug.h"
#ifndef O_BINARY
#define O_BINARY 0

View File

@ -8,10 +8,10 @@
**/
#include "orconfig.h"
#include "util_bug.h"
#include "torlog.h"
#include "backtrace.h"
#include "container.h"
#include "common/util_bug.h"
#include "common/torlog.h"
#include "common/backtrace.h"
#include "common/container.h"
#ifdef __COVERITY__
int bug_macro_deadcode_dummy__ = 0;

View File

@ -37,8 +37,8 @@
#define TOR_UTIL_BUG_H
#include "orconfig.h"
#include "compat.h"
#include "testsupport.h"
#include "common/compat.h"
#include "common/testsupport.h"
/* Replace assert() with a variant that sends failures to the log before
* calling assert() normally.

View File

@ -12,10 +12,10 @@
*/
#include "orconfig.h"
#include "torlog.h"
#include "util.h"
#include "util_format.h"
#include "torint.h"
#include "common/torlog.h"
#include "common/util.h"
#include "common/util_format.h"
#include "common/torint.h"
#include <stddef.h>
#include <string.h>

View File

@ -7,8 +7,8 @@
#ifndef TOR_UTIL_FORMAT_H
#define TOR_UTIL_FORMAT_H
#include "testsupport.h"
#include "torint.h"
#include "common/testsupport.h"
#include "common/torint.h"
/** @{ */
/** These macros don't check for overflow. Use them only for constant inputs

View File

@ -19,10 +19,10 @@
#include <sys/wait.h>
#endif
#include "compat.h"
#include "util.h"
#include "torlog.h"
#include "util_process.h"
#include "common/compat.h"
#include "common/util.h"
#include "common/torlog.h"
#include "common/util_process.h"
#include "ht.h"
/* ================================================== */

View File

@ -24,14 +24,14 @@
*/
#include "orconfig.h"
#include "compat.h"
#include "compat_libevent.h"
#include "compat_threads.h"
#include "crypto_rand.h"
#include "util.h"
#include "workqueue.h"
#include "common/compat.h"
#include "common/compat_libevent.h"
#include "common/compat_threads.h"
#include "common/crypto_rand.h"
#include "common/util.h"
#include "common/workqueue.h"
#include "tor_queue.h"
#include "torlog.h"
#include "common/torlog.h"
#include <event2/event.h>

View File

@ -4,7 +4,7 @@
#ifndef TOR_WORKQUEUE_H
#define TOR_WORKQUEUE_H
#include "compat.h"
#include "common/compat.h"
/** A replyqueue is used to tell the main thread about the outcome of
* work that we queued for the workers. */

View File

@ -59,7 +59,7 @@
#include <errno.h>
#include <err.h>
/* For SIZE_MAX */
#include "torint.h"
#include "common/torint.h"
//#include "thread_private.h"

View File

@ -29,10 +29,10 @@
Jean-Philippe Aumasson (https://131002.net/siphash/siphash24.c)
*/
#include "torint.h"
#include "common/torint.h"
#include "siphash.h"
/* for tor_assert */
#include "util.h"
#include "common/util.h"
/* for memcpy */
#include <string.h>
#include "byteorder.h"

View File

@ -25,7 +25,7 @@
#include "orconfig.h"
#include <string.h>
#include "torint.h"
#include "common/torint.h"
typedef uint8_t u8;
typedef uint64_t limb;

View File

@ -48,7 +48,7 @@
#include "orconfig.h"
#include <string.h>
#include "torint.h"
#include "common/torint.h"
typedef uint8_t u8;
typedef int32_t s32;

View File

@ -9,7 +9,7 @@
void ed25519_hash(uint8_t *hash, const uint8_t *in, size_t inlen);
*/
#include "crypto_digest.h"
#include "common/crypto_digest.h"
typedef struct ed25519_hash_context {
crypto_digest_t *ctx;

View File

@ -8,7 +8,7 @@
*/
/* Tor: Instead of calling OpenSSL's CSPRNG directly, call the wrapper. */
#include "crypto_rand.h"
#include "common/crypto_rand.h"
static void
ED25519_FN(ed25519_randombytes_unsafe) (void *p, size_t len)

View File

@ -1,7 +1,7 @@
/* Added for Tor. */
#ifndef SRC_EXT_ED25519_DONNA_H_INCLUDED_
#define SRC_EXT_ED25519_DONNA_H_INCLUDED_
#include <torint.h>
#include "common/torint.h"
typedef unsigned char curved25519_key[32];

View File

@ -40,7 +40,7 @@
#include "ed25519-randombytes.h"
#include "ed25519-hash.h"
#include "crypto_util.h"
#include "common/crypto_util.h"
typedef unsigned char ed25519_signature[64];
typedef unsigned char ed25519_public_key[32];

View File

@ -7,7 +7,7 @@
#include "ed25519_ref10.h"
#include <string.h>
#include "crypto_util.h"
#include "common/crypto_util.h"
static void
ed25519_ref10_gettweak(unsigned char *out, const unsigned char *param)

View File

@ -1,5 +1,5 @@
/* Added for Tor. */
#include "crypto_digest.h"
#include "common/crypto_digest.h"
/* Set 'out' to the 512-bit SHA512 hash of the 'len'-byte string in 'inp' */
#define crypto_hash_sha512(out, inp, len) \

View File

@ -3,7 +3,7 @@
#ifndef CRYPTO_INT32_H
#define CRYPTO_INT32_H
#include "torint.h"
#include "common/torint.h"
#define crypto_int32 int32_t
#define crypto_uint32 uint32_t

View File

@ -3,7 +3,7 @@
#ifndef CRYPTO_INT64_H
#define CRYPTO_INT64_H
#include "torint.h"
#include "common/torint.h"
#define crypto_int64 int64_t
#define crypto_uint64 uint64_t

View File

@ -1,3 +1,3 @@
/* Added for Tor. */
#include "torint.h"
#include "common/torint.h"
#define crypto_uint32 uint32_t

View File

@ -1,3 +1,3 @@
/* Added for Tor. */
#include "torint.h"
#include "common/torint.h"
#define crypto_uint64 uint64_t

View File

@ -1,5 +1,4 @@
/* Added for Tor. */
#include "di_ops.h"
#include "common/di_ops.h"
#define crypto_verify_32(a,b) \
(! tor_memeq((a), (b), 32))

View File

@ -1,7 +1,7 @@
/* Added for Tor */
#ifndef SRC_EXT_ED25519_REF10_H_INCLUDED_
#define SRC_EXT_ED25519_REF10_H_INCLUDED_
#include <torint.h>
#include "common/torint.h"
int ed25519_ref10_seckey(unsigned char *sk);
int ed25519_ref10_seckey_expand(unsigned char *sk, const unsigned char *sk_seed);

Some files were not shown because too many files have changed in this diff Show More