Roger Dingledine
2cf8f6772b
remove stray equals sign
...
resolves ticket 22256. this typo crept in during bug 21715's commit
fd8284c8
.
2017-05-14 19:00:36 -04:00
Alexander Færøy
363f4b8db5
Add stub functions for querying metadata about the consensus.
2017-05-13 01:05:15 +02:00
Alexander Færøy
64116ab97f
Fix tautological constant out-of-range comparison warnings.
2017-05-12 17:59:29 +02:00
Alexander Færøy
a1e8ef0076
Fix DoubleNL warning from make check-spaces
.
2017-05-12 17:57:11 +02:00
Nick Mathewson
077d3085ec
actually enable background compresion for consensuses
2017-05-12 17:45:55 +02:00
Nick Mathewson
db370bb8a8
Test fix: expect old consensuses to be deleted if not deflate-compressed
2017-05-12 17:45:44 +02:00
Nick Mathewson
30dfb36148
consdiffmgr: Reload latest consensus entries on start.
2017-05-12 17:45:33 +02:00
Nick Mathewson
8100305e71
consdiffmgr: expose cached consensuses
2017-05-12 17:45:24 +02:00
Nick Mathewson
7b0dcf5c4a
Cleanup logic: only retain zlib-compressed consensuses
...
Now that we're making a bunch of these with consdiffmgr, we should
throw out all but one when we get a newer consensus.
2017-05-12 17:45:15 +02:00
Nick Mathewson
151cd121a2
consdiffmgr: compress incoming consensuses in the background
...
Also, compress them in several ways.
This breaks the unit tests; subsequent commits will make them pass
again.
2017-05-12 17:45:07 +02:00
Nick Mathewson
6da31ec484
consdiffmgr: Extract the code for compressing and storing
...
We're going to use this for consensuses too.
2017-05-12 17:44:55 +02:00
Alexander Færøy
7a3efe25d9
Use different preferences for compression methods when streaming.
...
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
141f6e3211
Add client_meth_pref array to define client compression preference.
...
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
59d17ca2bb
Fix indentation when using the ternary operator in handle_get_status_vote().
...
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
ef187bc280
Use compression_method_get_human_name() in connection_dir_client_reached_eof()
...
This patch refactors connection_dir_client_reached_eof() to use
compression_method_get_human_name() to set description1 and
description2 variables.
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
3a05687c6d
Add API for getting human readable descriptions of a compress_method_t
...
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
f8218b5ada
Use compression_method_get_by_name() instead of explicit checks.
...
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
cf2f7a1bea
Decide compression method in the various handle_* functions().
...
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
a3a31fa120
Send "Accept-Encoding" to directory servers.
...
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
6305637197
Use tor_compress_supports_method() instead of constants.
...
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
61b6de5906
Handle Zstandard and LZMA in our check for correct guessed compression.
...
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
fbef257c43
Handle x-zstd and x-tor-lzma in parse_http_response().
...
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Alexander Færøy
ca632144e5
Use dir_compressed(_len) instead of dir_z(_len).
...
This patch renames `dir_z` to `dir_compressed` and `dir_z_len` to
`dir_compressed_len`.
See: https://bugs.torproject.org/21667
2017-05-12 17:18:45 +02:00
Nick Mathewson
4410271446
Merge branch 'ticket21953_029'
2017-05-12 08:40:30 -04:00
Nick Mathewson
503f101d2b
Enable some windows hardening features
...
One (HeapEnableTerminationOnCorruption) is on-by-default since win8;
the other (PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION) supposedly only
affects ATL, which (we think) we don't use. Still, these are good
hygiene. Closes ticket 21953.
2017-05-11 16:39:02 -04:00
Taylor Yu
61a367cadd
Untangle cleanup logic in test_hs_intropoint.c
...
Cleanup logic in test_intro_point_registration() invoked tt_assert()
in a way that could cause it to jump backward into the cleanup code if
the assertion failed, causing Coverity to see a double free (CID
1397192). Move the tt_assert() calls into a helper function having
the well-defined task of testing hs_circuitmap_free_all().
Fixes #22231 .
2017-05-11 13:06:45 -04:00
Nick Mathewson
9905659573
Merge remote-tracking branch 'arma/cleanup22213'
2017-05-11 09:20:12 -04:00
Nick Mathewson
6390a0c3b6
Merge branch 'ticket21871_031_03_squashed'
2017-05-11 08:33:32 -04:00
David Goulet
ae1d4cfdad
prop224: Change encryption keys descriptor encoding
...
A descriptor only contains the curve25519 public key in the enc-key field so
the private key should not be in that data structure. The service data
structures will have access to the full keypair (#20657 ).
Furthermore, ticket #21871 has highlighted an issue in the proposal 224 about
the encryption key and legacy key being mutually exclusive. This is very wrong
and this commit fixes the code to follow the change to the proposal of that
ticket.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-05-11 08:33:26 -04:00
Nick Mathewson
18e59fdc1c
Improve MyFamily docs, based on patch from nusenu
...
Closes ticket 22223
2017-05-11 07:46:55 -04:00
Nick Mathewson
dc9274dec3
Merge remote-tracking branch 'argonblue/bug22177'
2017-05-11 07:41:21 -04:00
Nick Mathewson
38003f4350
Merge remote-tracking branch 'argonblue/bug22221'
2017-05-11 07:25:22 -04:00
Roger Dingledine
8f1ddf0cd2
Remove unused "ROUTER_ADDED_NOTIFY_GENERATOR" internal value
...
We already have a way to return a 400 response code along with a
personalized message response for the uploader.
Resolves ticket 22213.
2017-05-10 20:03:07 -04:00
Roger Dingledine
466e27feae
simplify functions now that they don't use options param
2017-05-10 17:57:35 -04:00
Roger Dingledine
2330a3713d
Merge branch 'maint-0.3.0'
2017-05-10 17:36:34 -04:00
Roger Dingledine
716d48581d
resolve now-unused parameter from #21642 fix
2017-05-10 17:35:36 -04:00
Taylor Yu
3156392e9b
Test config line parsing errors
...
Add tests for lower-level syntax errors in config file lines.
Fixes #22177 .
2017-05-10 16:51:40 -04:00
Nick Mathewson
1a497dcd1e
Merge branch 'maint-0.3.0'
2017-05-10 16:28:07 -04:00
Nick Mathewson
a868b84599
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-05-10 16:27:15 -04:00
Nick Mathewson
8f5da804da
Merge branch 'prop275_minimal_029' into maint-0.2.9
2017-05-10 16:26:45 -04:00
Taylor Yu
2bf4263800
Resurrect dead code in test_channelpadding.c
...
A for-loop in test_channelpadding_timers() would never run because it
was trying to increment a counter up to CHANNELS_TO_TEST/3 after an
earlier block already incremented it to CHANNELS_TO_TEST/2.
Fixes #22221 , CID 1405983.
2017-05-10 13:57:18 -04:00
Nick Mathewson
ee3ccd2fac
#22211 Fix a comment in routerparse.c
2017-05-10 11:16:07 -04:00
Nick Mathewson
d76cffda60
Merge remote-tracking branch 'public/my-family-list-fix-4498'
2017-05-10 11:12:24 -04:00
Nick Mathewson
8266d193a6
Restore wget behavior when fetching compressed objects
...
We do this by treating the presence of .z as meaning ZLIB_METHOD,
even if Accept-Encoding does not include deflate.
This fixes bug 22206; bug not in any released tor.
2017-05-10 11:09:52 -04:00
Nick Mathewson
5dab99d6a8
Fix compilation on libevent2-only systems
...
Patch from rubiate; fixes bug 22219. Remember, we don't support
libevent1 any more.
2017-05-10 11:08:49 -04:00
Nick Mathewson
95fa7d1cf8
In channelpadding tests that touch libevent, call event_reinit().
...
This is necessary to avoid crashes and test failures on kevent-based
systems.
Fixes bug 22209; bug not in any released Tor.
2017-05-10 11:01:13 -04:00
Roger Dingledine
0266c4ac81
add an XXX with a minor bug in dirserv_add_multiple_descriptors
2017-05-10 03:11:29 -04:00
Nick Mathewson
9f5b71a7ca
Add a check and a cast in rephist.c to fix a warning
2017-05-09 11:13:22 -04:00
Nick Mathewson
b2cb3c33ac
Tidy or_options_t by removing obsolete options.
...
Nothing was setting or inspecting these fields, and they were marked
as OBSOLETE() in config.c -- but somehow we still had them in the
or_options_t structure. Ouch.
2017-05-09 10:40:24 -04:00
Nick Mathewson
2a1013948d
Merge branch 'dgoulet_ticket22060_031_01_squashed'
2017-05-09 10:32:21 -04:00