Nick Mathewson
03d7812615
Make sure liberr-testing is build with testing flags.
2018-06-21 13:14:14 -04:00
Nick Mathewson
b420da4cf8
Rectify include paths (automated)
2018-06-21 13:14:14 -04:00
Nick Mathewson
2d20cbf837
Extract compression functions into a new library.
2018-06-21 13:08:25 -04:00
Roger Dingledine
471418befb
tiny comment and whitespace fixes
2018-06-21 13:07:51 -04:00
Nick Mathewson
ad7776f66d
Rename libtor.a to libtor-app.a
2018-06-21 11:03:39 -04:00
Nick Mathewson
727db7aeb9
Rectify include paths (automated)
2018-06-21 11:03:39 -04:00
Nick Mathewson
a403ee6bb3
Move consttime library code into its own directory.
2018-06-21 11:03:39 -04:00
Nick Mathewson
275aff6917
Rectify include paths (automated)
2018-06-21 10:47:11 -04:00
Nick Mathewson
2cfcb7b364
Extract error functionality into a new lowest-level library.
2018-06-21 10:47:11 -04:00
Nick Mathewson
b2346b1201
Refactor makefiles to keep list of internal libraries in one place.
...
This change makes it possible for us to change the list of libraries
more easily, without changing every single linker line.
2018-06-21 10:35:30 -04:00
Nick Mathewson
da728e36f4
Rectify include paths (automated)
2018-06-21 09:55:16 -04:00
Nick Mathewson
874ba6861a
Fix distcheck by naming header properly.
2018-06-21 09:37:32 -04:00
Nick Mathewson
2ad062ee60
Merge branch 'mikeperry_bug26214-rebased_squashed'
2018-06-21 09:20:03 -04:00
Mike Perry
46b06cd699
Bug 26214: Test updates.
2018-06-21 09:18:51 -04:00
Mike Perry
dc397f9a61
Bug 26214: Check stream SENDME against max.
2018-06-21 09:18:51 -04:00
Nick Mathewson
c42071f750
Merge branch 'maint-0.3.4'
2018-06-21 08:59:58 -04:00
Nick Mathewson
e845bd17f8
Merge branch 'bug25787_squashed' into maint-0.3.4
2018-06-21 08:56:27 -04:00
Nick Mathewson
cacf326e78
Revise geoip tests to not require paths of actual geoip config
...
When I wrote the first one of these, it needed the path of the geoip
file. But that doesn't translate well in at least two cases:
- Mingw, where the compile-time path is /c/foo/bar and the
run-time path is c:\foo\bar.
- Various CI weirdnesses, where we cross-compile a test binary,
then copy it into limbo and expect it to work.
Together, these problems precluded these tests running on windows.
So, instead let's just generate some minimal files ourselves, and
test against them.
Fixes bug 25787
2018-06-21 08:56:20 -04:00
Nick Mathewson
27e456cd72
Merge remote-tracking branch 'rl1987/ticket19979_2'
2018-06-21 08:53:48 -04:00
Nick Mathewson
72a5ae8c66
Merge branch 'maint-0.3.4'
2018-06-21 08:38:21 -04:00
Nick Mathewson
73bc863822
Merge branch 'additional_rust_test_fixes' into maint-0.3.4
2018-06-21 08:38:17 -04:00
Nick Mathewson
683776bfab
Merge branch 'maint-0.3.4'
2018-06-21 08:36:48 -04:00
Nick Mathewson
c389c41292
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-06-21 08:36:48 -04:00
Nick Mathewson
599b53f046
add a bn.h include to crypto_dh.c
2018-06-21 08:34:27 -04:00
Roger Dingledine
7b1a3c5164
fix memory leak in protover.c
...
Fix a memory leak where directory authorities would leak a chunk of
memory for every router descriptor every time they considered voting.
This bug was taking down directory authorities in the live network due
to out-of-memory issues.
Fixes bug 26435; bugfix on 0.3.3.6.
2018-06-20 19:43:58 -04:00
Nick Mathewson
01d0bf1803
add build.rs to EXTRA_DIST
2018-06-20 19:32:01 -04:00
Nick Mathewson
8f3712cf6e
eol@eof is still the law in 0.3.4 :(
2018-06-20 19:05:11 -04:00
Nick Mathewson
d110f9c9a6
Add a leak suppression for backtrace_alloc
...
This appears to be an internal rust thing: I don't know why it's
leaking. We should investigate further.
2018-06-20 18:02:49 -04:00
Nick Mathewson
3b606ff787
Merge branch 'maint-0.3.4' into additional_rust_test_fixes
2018-06-20 17:53:51 -04:00
Nick Mathewson
f24797a587
Merge branch 'maint-0.3.4'
2018-06-20 17:49:56 -04:00
Nick Mathewson
f91ea506f0
Fix clang warnings introduced by 9f2b887c5d
2018-06-20 17:49:06 -04:00
Nick Mathewson
3a64052099
Fix memory leak in CryptoDigest type
...
If you're owning a C pointer, you need to implement Drop.
2018-06-20 17:28:28 -04:00
Nick Mathewson
592e8ac395
Disable doctests in src/rust/crypto module.
...
These all need C linking to work, and so far, rustdoc does not seem
to respect cargo setting about build scripts or RUSTOPTIONS.
2018-06-20 17:16:44 -04:00
Nick Mathewson
901ada7e5f
Fix bugs in rust digest tests
2018-06-20 17:08:00 -04:00
Nick Mathewson
e99ecf9399
Merge branch 'rust_build_script_v3' into additional_rust_test_fixes
2018-06-20 17:07:47 -04:00
Nick Mathewson
398f15bdf1
Merge branch 'maint-0.3.4'
2018-06-20 16:37:39 -04:00
Isis Lovecruft
7589fd6d40
rust: Remove --all-features flag from cargo test
call in test_rust.sh.
...
We'd like to feature gate code that calls C from Rust, as a workaround
to several linker issues when running `cargo test` (#25386 ), and we
can't feature gate anything out of test code if `cargo test` is called
with `--all-features`.
* FIXES #26400 : https://bugs.torproject.org/26400
2018-06-20 16:37:33 -04:00
Nick Mathewson
c86850c4c9
Don't use any asserts(), even raw, in format_number_sigsafe().
...
Also explain why.
2018-06-20 16:16:45 -04:00
Nick Mathewson
057d838409
Use raw_assert() in write_all().
...
This makes tor_log() finally non-circular.
2018-06-20 16:16:45 -04:00
Nick Mathewson
7a2dce9006
Use raw_assert() in central allocation functions.
...
This is, again, to avoid circularity in the log code.
2018-06-20 16:16:45 -04:00
Nick Mathewson
17ba51a30a
Use raw_assert in mutex functions to avoid circularity in logs.
2018-06-20 16:16:45 -04:00
Nick Mathewson
bb15dc1ebd
Allow raw_assert() to dump stack traces.
...
It doesn't do this as beautifully as tor_assert(), but it doesn't
depend on any higher-level code.
2018-06-20 16:16:45 -04:00
Nick Mathewson
a969ce464d
Remove log dependency from backtrace.[ch]
2018-06-20 16:16:45 -04:00
Nick Mathewson
3246c9648c
Use compat_compiler to restore macros in torerr.h
2018-06-20 15:08:06 -04:00
Nick Mathewson
aa490e971b
Split compiler-compatibility parts of compat.h
2018-06-20 15:08:06 -04:00
Nick Mathewson
5ecd1fec15
Move horrible-emergency handling into torerr.[ch]
...
Previously we had code like this for bad things happening from
signal handlers, but it makes sense to use the same logic to handle
cases when something is happening at a level too low for log.c to be
involved.
My raw_assert*() stuff now uses this code.
2018-06-20 15:08:06 -04:00
Nick Mathewson
8865972a0b
Use raw_assert in tor_gettimeofday
...
We don't want to actually be calling logs when gettimeofday() fails,
since we need gettimeofday() to log.
2018-06-20 10:42:06 -04:00
Nick Mathewson
90aeaa53cd
Remove all use of the assert.h header
...
Nothing in Tor has actually called assert() for some while.
2018-06-20 10:39:07 -04:00
Nick Mathewson
ae01864b5d
Add raw_assert() variants for cases where we cannot log.
...
Remove a different raw_assert() macro declared in log.c
2018-06-20 10:36:14 -04:00
Nick Mathewson
9fa73003fc
Remove dmalloc support; closes #26426
...
Dmalloc hasn't seen a release in over a decade, and there are much
better tools to use these days.
2018-06-20 10:21:34 -04:00
Nick Mathewson
0dab29ce10
Run rectify_include_paths.py
2018-06-20 09:35:05 -04:00
Nick Mathewson
257b280776
Simplify AM_CPPFLAGS include setup
...
We had accumulated a bunch of cruft here. Now let's only include
src and src/ext. (exception: src/trunnel is autogenerated code, and
need to include src/trunnel.)
This commit will break the build hard. The next commit will fix it.
2018-06-20 09:27:04 -04:00
Nick Mathewson
d7301a456a
Merge remote-tracking branch 'neel/b25886c'
2018-06-20 08:32:34 -04:00
Nick Mathewson
e9c93a3415
Merge branch 'maint-0.3.4'
2018-06-20 08:29:52 -04:00
Nick Mathewson
0a6f4627a4
eol@eof in test-dir.c
2018-06-20 08:29:38 -04:00
Nick Mathewson
fb0019daf9
Update copyrights to 2018.
2018-06-20 08:13:28 -04:00
Nick Mathewson
11a76b903b
Merge branch 'maint-0.3.4'
2018-06-20 08:05:07 -04:00
Nick Mathewson
7b9cd5cca5
Merge branch 'asn_bug24977_final_squashed' into maint-0.3.4
2018-06-20 08:02:27 -04:00
George Kadianakis
b7b7dab00d
Recreate nodelist before use if it's outdated.
...
We currently only do the check when we are about to use the HSDir indices.
2018-06-20 08:01:02 -04:00
George Kadianakis
a686464420
Recreate voting schedule before use if it's outdated.
2018-06-20 08:01:02 -04:00
Nick Mathewson
334edc22d1
Merge branch 'maint-0.3.4'
2018-06-20 07:55:15 -04:00
Isis Lovecruft
4971d7afa6
rust: Remove redundant "testing" feature from tor_log crate.
...
It was synonymous with the builtin "test" feature.
* FIXES #26399 : https://bugs.torproject.org/26399
2018-06-20 07:55:12 -04:00
Nick Mathewson
5acbcf150e
Merge branch 'maint-0.3.4'
2018-06-20 07:53:22 -04:00
rl1987
9054ccb36b
Enable DEBUG_SMARTLIST in unit tests
2018-06-20 07:49:41 -04:00
rl1987
7bb3777dfb
Refrain from accessing empty smartlist in test_bridges_clear_bridge_list
...
Just check that smartlist length is zero instead
2018-06-20 07:49:41 -04:00
Nick Mathewson
152e4a1e50
Merge branch 'maint-0.3.4'
2018-06-20 07:35:17 -04:00
Nick Mathewson
ac1747e47f
Merge remote-tracking branch 'catalyst-github/bug26415_034' into maint-0.3.4
2018-06-20 07:35:13 -04:00
Nick Mathewson
b63d6984a6
Merge branch 'maint-0.3.4'
2018-06-19 19:10:28 -04:00
Alexander Færøy
e309aa4c8c
Fix linker errors when building Tor.
...
This patch fixes linking errors when compiling Tor with the dirauth
module disabled.
See: https://bugs.torproject.org/26418
2018-06-19 23:10:12 +02:00
Taylor Yu
bfd36177c4
Fix compilation of Rust crypto doctests
...
The doctests for src/rust/crypto don't compile for multiple reasons,
including some missing exports and incorrect identifier paths. Fixes
bug 26415; bugfix on 0.3.4.1-alpha.
2018-06-19 13:53:26 -05:00
rl1987
5af29fbb63
When possible, use RFC5869 HKDF implementation from OpenSSL
...
Also, stop supporting empty HKDF input key material
2018-06-19 19:26:31 +03:00
Nick Mathewson
bd9ebb3763
Use a rust build script to set linker options correctly for tests.
...
We need this trick because some of our Rust tests depend on our C
code, which in turn depend on other native libraries, which thereby
pulls a whole mess of our build system into "cargo test".
To solve this, we add a build script (build.rs) to set most of the
options that we want based on the contents of config.rust. Some
options can't be set, and need to go to the linker directly: we use
a linker replacement (link_rust.sh) for these. Both config.rust and
link_rust.sh are generated by autoconf for us.
This patch on its own should enough to make the crypto test build,
but not necessarily enough to make it pass.
2018-06-19 12:01:13 -04:00
Nick Mathewson
f3267741e4
Merge branch 'maint-0.3.4'
2018-06-18 17:09:03 -04:00
Nick Mathewson
d27745d81d
Remove duplicate MODULE_DIRAUTH_SOURCES from libtor_testing.a
...
This was already added to LIBTOR_A_SOURCES; it doesn't need to get
added again.
Fixes bug 26402. Bugfix on 0.3.4.1-alpha.
2018-06-18 17:07:27 -04:00
Nick Mathewson
5879909826
Revert "Remove duplicate MODULE_DIRAUTH_SOURCES from libtor_testing.a"
...
This reverts commit 70d91bd059
.
2018-06-18 17:06:18 -04:00
Nick Mathewson
70d91bd059
Remove duplicate MODULE_DIRAUTH_SOURCES from libtor_testing.a
...
This was already added to LIBTOR_A_SOURCES; it doesn't need to get
added again.
Fixes bug 26402. Bugfix on 0.3.4.1-alpha.
2018-06-18 17:03:52 -04:00
Nick Mathewson
29982e5190
Remove redundant typedefs from _st.h files
...
The typedefs are already in or.h
2018-06-18 16:05:36 -04:00
David Goulet
a8e76f3824
test: Add missing headers in test_controller.c
...
After the big or.h refactoring, one single unit test file was missing two
headers for node_t and microdesc_t.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-06-18 15:07:30 -04:00
Nick Mathewson
104c2e9e7e
Merge branch 'split_or_h'
2018-06-18 14:18:34 -04:00
Nick Mathewson
bcc1368c77
Merge branch 'maint-0.3.4'
2018-06-18 13:10:47 -04:00
Nick Mathewson
3640c63498
Merge remote-tracking branch 'ffmancera-1/bug24658-dh_stream'
2018-06-17 20:39:13 -04:00
Nick Mathewson
16dd2f7bb0
Merge remote-tracking branch 'rl1987/bug25477'
2018-06-17 20:25:40 -04:00
Nick Mathewson
5746e210b8
Merge remote-tracking branch 'rl1987/feature8323_squashed2'
2018-06-17 20:20:15 -04:00
Nick Mathewson
d5e4b6983f
Merge remote-tracking branch 'rl1987/bug26282'
2018-06-17 19:32:08 -04:00
Nick Mathewson
987174cc6f
Merge remote-tracking branch 'github/bug26152_035'
2018-06-17 19:28:59 -04:00
Nick Mathewson
e6aa2d526e
Changes to make the rust crypto::mod tests compile
...
The digest tests don't link yet, though.
2018-06-16 13:22:44 -04:00
Nick Mathewson
8184f45ad9
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-06-16 13:10:19 -04:00
Nick Mathewson
ccf1eb3164
Fix a bug in my fix for #26258
...
The fix here is use a different bourne shell subsitution for
CARGO_ONLINE, so that an empty string counts as set.
2018-06-16 13:08:40 -04:00
Nick Mathewson
71ddfbaadd
Merge remote-tracking branch 'isis/bug26267' into maint-0.3.4
2018-06-16 12:43:28 -04:00
Neel Chauhan
9d7f148885
Make frac_nodes_with_descriptors() take and use for_direct_connect
2018-06-16 11:27:28 -04:00
Nick Mathewson
97cc61e947
Merge branch 'maint-0.3.4'
2018-06-16 10:20:27 -04:00
Nick Mathewson
530d67410f
Merge remote-tracking branch 'isis/bug26245' into maint-0.3.4
2018-06-16 10:19:26 -04:00
Nick Mathewson
8c1e2d7557
Merge branch 'maint-0.3.4'
2018-06-16 10:15:39 -04:00
Isis Lovecruft
748a0c7d0b
rust: Remove unused N_DIGEST_ALGORITHMS constant from crypto_digest.rs.
...
In the C code, this constant is only ever used in src/test/bench.c.
* FIXES part of #26245 : https://bugs.torproject.org/26245
2018-06-15 23:22:43 +00:00
Isis Lovecruft
d5a9b77a28
rust: Add comment and pragma on "unused" smartlist_t type.
...
* FIXES part of #26245 : https://bugs.torproject.org/26245
2018-06-15 22:49:39 +00:00
Taylor Yu
468bf58fa2
Make Rust warnings conditionally fatal
...
Set rustc flags to treat warnings as fatal if configured with
--enable-warnings.
2018-06-15 17:27:19 -05:00
Isis Lovecruft
ac5b1428ea
rust: Expose rand module from crypto crate.
2018-06-15 21:44:22 +00:00
Nick Mathewson
e22822e4ae
Bump master to 0.3.5.0-alpha-dev
2018-06-15 17:19:49 -04:00
Taylor Yu
9dd45456fe
Set default-features = false for rand_core
...
Apparently rand and rand_core need to be built with the "std" feature
set consistently, or there will be a compile error in rngs/jitter.rs.
2018-06-15 15:19:16 -05:00
Nick Mathewson
7dbe504f3e
Move hsdir_index_t into its own header.
2018-06-15 15:41:27 -04:00