Commit Graph

542 Commits

Author SHA1 Message Date
Nick Mathewson
91c63aae84 In relay_digest_matches(), use stack instead of heap.
We'd been using crypto_digest_dup() and crypto_digest_assign() here,
but they aren't necessary.  Instead we can just use the stack to
store the previous state of the SHA_CTX and avoid a malloc/free pair.

Closes ticket 24914.
2018-01-25 13:59:55 -05:00
Nick Mathewson
b1fc383bdb Bump version to 0.3.3.1-alpha-dev 2018-01-25 13:50:55 -05:00
Nick Mathewson
25a1183fbe bump version to 0.3.3.1-alpha 2018-01-25 11:48:42 -05:00
Nick Mathewson
2c9e0a286c Merge branch 'restart_debug_squashed' 2018-01-19 09:52:14 -05:00
Nick Mathewson
97d9ba2380 Add a mostly disabled feature to debug restarting in-process
For 23847, we want Tor to be able to shut down and then restart in
the same process.  Here's a patch to make the Tor binary do that.
To test it, you need to build with --enable-restart-debugging, and
then you need to set the environment variable TOR_DEBUG_RESTART.
With this option, Tor will then run for 5 seconds, then restart
itself in-process without exiting.  This only happens once.

You can change the 5-second interval using
TOR_DEBUG_RESTART_AFTER_SECONDS.

Implements ticket 24583.
2018-01-19 09:52:05 -05:00
Nick Mathewson
f470756cf4 Merge branch 'maint-0.3.2' 2018-01-16 13:36:48 -05:00
Nick Mathewson
0cb89eb828 Merge remote-tracking branch 'public/bug24652_032' into maint-0.3.2 2018-01-16 13:35:52 -05:00
Nick Mathewson
34c6034aa7 Increment version to 0.3.2.9-dev 2018-01-09 10:12:25 -05:00
Nick Mathewson
1f7f930f9e Increment version to 0.3.2.9 2018-01-08 11:39:24 -05:00
Nick Mathewson
2ac9734bd2 Use -lresolv in LIBS with rust on OSX.
This fixes issue #24652, and is a workaround for Rust issue
https://github.com/rust-lang/rust/issues/46797 .
2018-01-04 14:02:24 -05:00
Nick Mathewson
94c59851df Increment version to 0.3.2.8-rc-dev 2017-12-21 14:22:54 -05:00
Nick Mathewson
1a77799665 Increment version to 0.3.2.8-rc 2017-12-21 12:42:00 -05:00
Nick Mathewson
5c4da2cacd bump to 0.3.2.7-rc-dev 2017-12-14 14:12:31 -05:00
Nick Mathewson
93b3c4b844 update to 0.3.2.7-rc 2017-12-13 12:06:37 -05:00
Isis Lovecruft
c7dc65e033
build: Add pretty printing of results of rust autoconf checks.
* ADDS several `AC_MSG_RESULT`s which print the result of our checks
   for our rust dependencies and a check for a suitable rustc compiler
   version.
 * FIXES #24612: https://bugs.torproject.org/24612
2017-12-13 02:27:02 +00:00
Nick Mathewson
6c5a73f87a Merge remote-tracking branch 'ahf-oniongit/bugs/24362' 2017-12-12 09:18:52 -05:00
teor
2ff706ba02
Make configure log messages less confusing during static builds
Closes #24558.
2017-12-12 12:43:53 +11:00
Nick Mathewson
ea929e8456 Merge remote-tracking branch 'public/feature24427' 2017-12-11 09:59:46 -05:00
Alexander Færøy
b0b8f7c30c Add support for Android's logging subsystem.
This patch adds support for Android's logging subsystem in Tor. When
debugging Android applications it is useful to be able to collect
information about the application running on the platform via the
various system services that is available on the platform.

This patch allows you to add "Log notice android" to your torrc and have
Tor send everything above and including the notice severity to Android's
ring buffer which can be inspected using the 'adb logcat' program.

See: https://bugs.torproject.org/24362
2017-12-11 13:22:39 +00:00
Nick Mathewson
5ee0cccd49 Merge branch 'macro_free_v2_squashed' 2017-12-08 14:58:43 -05:00
Nick Mathewson
1d348989b0 Make tor_free only evaluate its input once (at least on gcc and clang) 2017-12-08 14:47:19 -05:00
Nick Mathewson
021fdd39e4 Use mach_approximate_time() for coarse time where available.
This lets us have a coarse-time implementation with reasonable
performance characteristics on OSX and iOS.

Implements 24427.
2017-12-08 09:24:02 -05:00
Nick Mathewson
998a247123 bump to 0.3.2.6-alpha-dev 2017-12-01 09:34:31 -05:00
Nick Mathewson
424ab08b5a bump to 0.3.2.6-alpha 2017-11-30 12:26:30 -05:00
Fernando Fernandez Mancera
bef461ef1f Switch -Wnormalized=id to -Wnormalized=nfkc
Modified -Wnormalized flag to nfkc option in configure.ac to avoid source code
identifier confusion.

Fixes #24467

Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2017-11-29 20:29:55 -05:00
Nick Mathewson
a7e777ab8e bump to 0.3.2.5-alpha-dev 2017-11-22 08:34:02 -05:00
Nick Mathewson
5da0a73838 Merge branch 'ticket23953_033_squashed' 2017-11-21 14:06:57 -05:00
Nick Mathewson
25f882a9cf Use stdatomic.h for atomic_counter_t where available.
Closes ticket 23953.
2017-11-21 14:06:48 -05:00
Fernando Fernandez Mancera
edc3fe0eb5 Remove /usr/athena from search path in configure.ac
Fixes #24363

Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2017-11-21 13:53:26 -05:00
Nick Mathewson
5da6120e88 bump version to 0.3.2.5-alpha 2017-11-21 12:54:11 -05:00
Nick Mathewson
9068e55ce8 Merge branch 'maint-0.3.2' 2017-11-20 14:25:17 -05:00
Nick Mathewson
1bf36c1837 Include ws2_32 when trying to link openssl on windows in autoconf
Fixes bug 23783; bugfix on 0.3.2.2-alpha when we started looking for
TLSv1_1_method().
2017-11-20 13:37:22 -05:00
Nick Mathewson
729f9a286c Merge branch 'maint-0.3.2' 2017-11-20 13:22:10 -05:00
Nick Mathewson
846df5b3cd Merge remote-tracking branches 'public/ticket24315_029' and 'public/bug24198_029' into maint-0.3.2 2017-11-20 13:20:25 -05:00
Nick Mathewson
2d3904aba6 Check the libc version to decide whether to allow openat. 2017-11-16 14:06:38 -05:00
Nick Mathewson
8ff60b5288 Merge branch 'maint-0.3.2' 2017-11-15 15:11:30 -05:00
Nick Mathewson
67c62394bc Merge branch 'bug24279_030' into maint-0.3.2 2017-11-15 15:09:33 -05:00
Alex Xu (Hello71)
74b7bfbe47 Fix configure libevent memory leak
Breaks build with externally-specified hardening flags.
2017-11-15 15:07:49 -05:00
Nick Mathewson
c8859582a2 bump to 0.3.2.4-alpha-dev 2017-11-08 16:44:53 -05:00
Nick Mathewson
c7d1d1ad2e Bump to 0.3.2.4-alpha 2017-11-07 13:22:27 -05:00
Sebastian Hahn
acdd349dee rename {,TOR_}RUST_DEPENDENCIES 2017-11-01 13:45:15 -04:00
Nick Mathewson
ef25f957e7 Merge branch 'tor_api_squashed' 2017-11-01 13:22:16 -04:00
Nick Mathewson
e8682c8594 Add a small library to emulate tor_run_main() with exec() 2017-11-01 13:22:09 -04:00
Nick Mathewson
d5eea977be bump to 0.3.2.3-alpha-dev. 2017-10-27 12:33:13 -04:00
Nick Mathewson
f5e9e2748f Merge branch 'protover-rust-impl_squashed' 2017-10-27 10:05:30 -04:00
Chelsea Holland Komlo
0c4d535972 refactor build infrastructure for single rust binary 2017-10-27 10:02:08 -04:00
Chelsea Holland Komlo
be583a34a3 use tor allocator for string allocation in rust 2017-10-27 10:02:08 -04:00
Chelsea Holland Komlo
d1820c1516 rust implementation of protover 2017-10-27 10:02:08 -04:00
Nick Mathewson
fb88527195 update to 0.3.2.3-alpha 2017-10-27 08:59:07 -04:00
Nick Mathewson
4edbbee2fd bump to 0.3.0.12-dev 2017-10-25 09:27:50 -04:00
Nick Mathewson
46091a88ca bump to 0.2.9.13-dev 2017-10-25 09:27:23 -04:00
Nick Mathewson
d913a7317b bump to 0.3.0.12 2017-10-24 09:09:35 -04:00
Nick Mathewson
09d2ae562a bump to 0.2.9.13 2017-10-24 09:09:26 -04:00
Nick Mathewson
e00f12ec6c bump version on master to 0.3.3.0-alpha-dev 2017-10-15 11:57:06 -04:00
Nick Mathewson
d0cae9fbc5 bump master to 0.3.2.2-alpha-dev 2017-10-02 19:19:51 -04:00
Alexander Færøy
c61508f9aa
Bump version to 0.3.2.2-alpha.
Signed-off-by: Isis Lovecruft <isis@torproject.org>
2017-10-02 19:23:32 +00:00
Nick Mathewson
2de588ffdb Merge branch 'ticket23602_029' 2017-09-26 13:02:26 -04:00
Nick Mathewson
564ff506ea When detecting OpenSSL, look for 1.0.1, and in homebrew location
Previously we would detect the system openssl on OSX, and then fail
to use it, since we required Open 1.0.1 or later.  That's silly!

Instead of looking for RAND_add(), look for TLSv1_1_method(): it was
introduced in 1.0.1, and is also present in LibreSSL.

Also, add the hombebrew path to our search path here.

Fixes bug 23602; bugfix on 0.2.7.2-alpha.
2017-09-20 16:07:19 -04:00
Nick Mathewson
32858610c7 bump to 0.3.2.1.-alpha-dev 2017-09-18 14:40:13 -04:00
Nick Mathewson
e78347fcc2 bump to 0.3.0.11-dev 2017-09-18 14:39:55 -04:00
Nick Mathewson
a57f1ff7ab bump to 0.2.9.12-dev 2017-09-18 14:39:46 -04:00
Nick Mathewson
d9dccb00cc Bump to 0.3.2.1-alpha 2017-09-18 10:30:41 -04:00
David Goulet
8424c4f35b sched: Detect KIST support at compile time
Add a detection for the KIST scheduler in our build system and set
HAVE_KIST_SUPPORT if available.

Adapt the should use kist function with this new compile option.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15 11:40:59 -04:00
Nick Mathewson
348b225bd8 version bump: 0.3.0.11 2017-09-14 13:20:52 -04:00
Nick Mathewson
3c6d4fe046 version bump: 0.2.9.12 2017-09-14 13:20:29 -04:00
Ties Stuij
2e99f839e9 22839: Build tor with rust enabled on win
- make tor_util static library name configurable
- fix Rust libary dependency order for Windows
2017-08-21 15:08:24 -04:00
cypherpunks
bfe740f065 Refactor retrieving the current working directory
The GNU C Library (glibc) offers an function which allocates the
necessary memory automatically [0]. When it is available, we use that.

Otherwise we depend upon the `getcwd` function which requires a
preallocated buffer (and its size). This function was used incorrectly
by depending on the initial buffer size being big enough and otherwise
failing to return the current working directory. The proper way of
getting the current working directory requires a loop which doubles the
buffer size if `getcwd` requires it. This code was copied from [1] with
modifications to fit the context.

[0] https://www.gnu.org/software/hurd/hurd/porting/guidelines.html
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html
2017-08-04 12:22:53 -04:00
Nick Mathewson
8925e84beb version bump to 0.3.0.10-dev 2017-08-02 12:28:34 -04:00
Nick Mathewson
4f7955d5de Bump to 0.3.0.10 2017-08-01 14:38:49 -04:00
Nick Mathewson
d9427c00df bump to 0.3.0.9-dev 2017-06-29 18:44:43 -04:00
Nick Mathewson
98ffb2e722 Update maint-0.3.0 to 0.3.0.9 2017-06-29 16:35:40 -04:00
Nick Mathewson
c2e546aa23 Merge remote-tracking branch 'argonblue/bug22410' 2017-06-19 15:30:23 -04:00
Taylor Yu
027614c263 Ensure that uint8_t is unsigned char
Many places in our code assume that uint8_t is the same type as
unsigned char.  Test this assumption in the configure script.  This is
important because of the privileged aliasing properties of character
types in C.

Fixes #22410.
2017-06-19 14:28:36 -04:00
Nick Mathewson
a3139c9750 Bump master to 0.3.2.0-alpha-dev. For 0.3.1, use maint-0.3.1 2017-06-19 11:57:44 -04:00
Nick Mathewson
6e7551c50d Add -dev to version number. 2017-06-08 14:05:32 -04:00
Nick Mathewson
90758b2606 Add -dev to version number. 2017-06-08 14:05:29 -04:00
Nick Mathewson
5e554215dd Add -dev to version number. 2017-06-08 14:05:27 -04:00
Nick Mathewson
b533220249 bump to 0.2.9.11 2017-06-08 09:24:38 -04:00
Nick Mathewson
a0664fd0c3 bump to 0.3.0.8 2017-06-08 09:24:28 -04:00
Nick Mathewson
78d4200abe Bump to 0.3.1.3-alpha. 2017-06-08 09:24:16 -04:00
Taylor Yu
90dd7dc92a Check for libzstd >= 1.1
The consensus compression code depends on a streaming compression API
that is new in libzstd-1.1.

Fixes #22413.
2017-05-30 13:25:34 -04:00
Nick Mathewson
5742e4fd8e bump version to 0.3.1.2-alpha-dev 2017-05-26 10:23:53 -04:00
Nick Mathewson
2550ac7bb1 update version to 0.3.1.2-alpha 2017-05-26 08:58:08 -04:00
Nick Mathewson
281f06a094 bump to 0.3.1.1-alpha 2017-05-22 11:52:19 -04:00
Nick Mathewson
69ef94820b Merge branch 'add_rust_squashed' 2017-05-19 08:47:18 -04:00
Sebastian Hahn
70c067102b Allow Rust build using locally supplied crates or crates.io
This adds a couple of configure commands to control whether we're
requiring all dependencies to be available locally (default) or not
(--enable-cargo-online-mode). When building from a tarball, we require
the RUST_DEPENDENCIES variable to point to the local repository of
crates. This also adds src/ext/rust as a git submodule that contains
such a local repository for easy setup.
2017-05-19 08:47:11 -04:00
Sebastian Hahn
aeba64efad Detect rustc version 2017-05-19 08:47:11 -04:00
Sebastian Hahn
d6f9a4f11a cargo-online-mode configure argument
Passing --enable-cargo-online-mode during configure allows cargo to make
network requests while building Tor or running tests. If this flag is
not supplied, the dependencies need to be available in the form of a
local mirror.
2017-05-19 08:47:11 -04:00
Nick Mathewson
d1340bd5ac bump to 0.3.0.7-dev 2017-05-18 12:28:28 -04:00
Nick Mathewson
8324631dd9 bump version to 0.3.0.7 2017-05-15 18:25:07 -04:00
Taylor Yu
5a2f1a836f Fix help message for --enable-lzma
Fixes #22111.
2017-05-01 11:16:25 -04:00
Sebastian Hahn
915fa39d0f Add --enable-rust configure switch
Introduce a way to optionally enable Rust integration for our builds. No
actual Rust code is added yet and specifying the flag has no effect
other than failing the build if rustc and cargo are unavailable.
2017-04-29 08:55:57 +02:00
Nick Mathewson
7ae7e3c2d8 bump to 0.3.0.6-dev 2017-04-26 15:37:27 -04:00
Nick Mathewson
31b79f02ab Bump version to 0.3.0.6 2017-04-26 13:30:39 -04:00
David Goulet
cb8ac1f331 trace: Add a basic event-tracing infrastructure.
This commit adds the src/trace directory containing the basics for our tracing
subsystem. It is not used in the code base. The "src/trace/debug.h" file
contains an example on how we can map our tor trace events to log_debug().

The tracing subsystem can only be enabled by tracing framework at compile
time. This commit introduces the "--enable-tracing-debug" option that will
make all "tor_trace()" function be maped to "log_debug()".

Closes #13802

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-04-25 10:37:31 -04:00
Alexander Færøy
ce1feae9d9 Add --enable-zstd to our configure script.
This patch adds support for enabling support for Zstandard to our configure
script. By default, the --enable-zstd option is set to "auto" which means if
libzstd is available we'll build Tor with Zstandard support.

See: https://bugs.torproject.org/21662
2017-04-25 08:10:09 -04:00
Alexander Færøy
157af1d26e Add --enable-lzma to our configure script.
This patch adds support for enabling support for LZMA to our configure
script. By default, the --enable-lzma option is set to "auto" which
means if liblzma is available we'll build Tor with LZMA support.

See: https://bugs.torproject.org/21662
2017-04-25 08:06:02 -04:00
Nick Mathewson
06fe8a14c4 bump to 0.3.0.5-rc-dev 2017-04-05 10:03:09 -04:00
Nick Mathewson
6ec3228220 version bump 2017-04-03 09:36:42 -04:00
Nick Mathewson
7505f452c8 Run the copyright update script. 2017-03-15 16:13:17 -04:00