Commit Graph

3379 Commits

Author SHA1 Message Date
rl1987 7b27d98eae Actually, just disable test_rebind.sh on Appveyor 2018-09-12 09:06:16 -04:00
rl1987 d30e47fd4e Disable test_rebind.sh on Windows 2018-09-12 09:06:16 -04:00
rl1987 5a11670fca Update/fix CI build
Update integration test to Python 3
2018-09-12 09:06:16 -04:00
rl1987 4811869d7a Pick random ports in test_rebind.py 2018-09-12 09:06:16 -04:00
rl1987 3f34fc921c Tweak test_rebind.py for future-proofness 2018-09-12 09:06:16 -04:00
rl1987 762c27b907 Integration test for socket rebinding
squash! Integration test for socket rebinding
2018-09-12 09:06:16 -04:00
Neel Chauhan 64d9ea1413 In addrs_in_same_network_family(), choose IP subnet size based on IP type 2018-08-17 13:37:51 +10:00
rl1987 fb137b30fc Exclude setenv/unsetenv code on Windows 2018-08-16 08:31:45 -04:00
rl1987 f454c28303 Fix test to pass without HOME env being set 2018-08-16 08:31:45 -04:00
rl1987 9c242e950b Consider all routerinfo errors other than "not a server" transient 2018-08-08 18:47:43 +03:00
Nick Mathewson 5e86a28683 Merge branch 'maint-0.3.4' 2018-08-07 08:05:56 -04:00
Nick Mathewson 882b2ad0aa Merge branch 'bug27003_034_v2' into maint-0.3.4 2018-08-07 08:05:51 -04:00
Nick Mathewson abf88af488 Merge branch 'maint-0.3.4' 2018-08-06 10:39:59 -04:00
Nick Mathewson a54e94878a Rename SEC identifier to BW_SEC in test_bwmgt.h
Apparently Solaris 10 defines SEC somewhere in its headers, causing
a compilation problem.

Fixes bug 26994; bugfix on 0.3.4.1-alpha.
2018-08-06 10:39:14 -04:00
Nick Mathewson 622a057e7e Merge remote-tracking branch 'public/string_coverage' 2018-08-03 07:03:29 -04:00
Nick Mathewson 176999fd95 When enabling periodic events, schedule but don't run them immediately.
When we fixed 25939 in f7633c1fca, we
introduced a call to rescan_periodic_events() from inside the onion
service logic. But this meant that we could rescan the event list --
thereby running event callbacks! -- from inside the hidden service code.
This could cause us to run some of our event callbacks from an
inconsistent state, if we were in the middle of changing options.

A related bug (#25761) prevented us from rescanning our periodic
events as appropriate, but when we fixed THAT one, this bug reared
its ugly head.

The fix here is that "enabling" an event should cause us to run it
from the event loop, but not immediately from the point where we
enable it.

Fixes bug 27003; bugfix on 0.3.4.1-alpha.
2018-08-02 10:14:56 -04:00
Nick Mathewson 861d690018 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-01 14:37:07 -04:00
Nick Mathewson af97879446 Merge branch 'maint-0.3.4' 2018-08-01 14:37:07 -04:00
Nick Mathewson eb604f5faa Fix build on GNU/Hurd. Patch from paulusASol. Closes 26873. 2018-08-01 14:37:03 -04:00
Nick Mathewson 21babc8d3f Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-30 09:01:59 -04:00
Nick Mathewson 3a6bd21440 Merge remote-tracking branch 'teor/bug26627_033_merged_master' 2018-07-30 09:01:55 -04:00
Nick Mathewson ac9d08f66a Merge remote-tracking branch 'juga/ticket3723_03_squashed_rebased' 2018-07-30 08:33:59 -04:00
teor fc4d08e260 Merge branch 'bug26627_033' into bug26627_033_merged_master 2018-07-25 09:17:17 +10:00
teor 3821081a55 Stop putting unsupported ed25519 link auth in v3 onion service descs
Stop putting ed25519 link specifiers in v3 onion service descriptors,
when the intro point doesn't support ed25519 link authentication.

Fixes bug 26627; bugfix on 0.3.2.4-alpha.
2018-07-25 09:16:15 +10:00
Nick Mathewson b44fce6716 Merge branch 'maint-0.3.4' 2018-07-19 08:32:00 -04:00
Nick Mathewson 0a60a94a55 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-19 08:31:07 -04:00
Nick Mathewson 27f5bd52fe Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-19 08:31:07 -04:00
Nick Mathewson 209332e71a Merge remote-tracking branch 'teor/bug26853_032' into maint-0.3.2 2018-07-19 08:30:59 -04:00
Nick Mathewson 9e247ac271 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-18 16:39:10 -04:00
Nick Mathewson 39d3187b0d Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-18 16:39:10 -04:00
Nick Mathewson 78386d8cdd Merge branch 'maint-0.2.9' into maint-0.3.2 2018-07-18 16:39:10 -04:00
Nick Mathewson 501deba8cf Try putting ulimit -c 0 in test_bt.sh to see if it fixes bug 26787 2018-07-18 16:33:48 -04:00
Nick Mathewson 23811052fe Add some missing includes and struct declarations. 2018-07-18 15:12:18 -04:00
Nick Mathewson 61e080e24a Merge branch 'maint-0.3.4' 2018-07-18 15:09:28 -04:00
Nick Mathewson a7bd20ebaf Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-18 15:08:57 -04:00
Nick Mathewson c31700d664 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-18 15:04:14 -04:00
Nick Mathewson 559f79fd79 Merge branch 'maint-0.2.9' into maint-0.3.2 2018-07-18 15:03:27 -04:00
Nick Mathewson a321d72401 Merge branch 'bug26485_029_squashed' into maint-0.2.9 2018-07-18 15:01:03 -04:00
Nick Mathewson fd5dce0a1b Add a test for format_recommended_version_list. 2018-07-18 15:00:53 -04:00
Nick Mathewson ef5c3c8216 Merge branch 'ulimit_when_crashing' 2018-07-18 09:38:04 -04:00
teor 449d190e2e SKIP test_key_expiration.sh on Windows until the underlying issue is resolved
Skip an unreliable key expiration test on Windows, until the underlying
issue in bug 26076 is resolved.

Fixes bug 26853; bugfix on 0.3.2.1-alpha.
2018-07-18 12:37:12 +10:00
Nick Mathewson ee12c11dd4 Increase line coverage in libtor-string to 100%
(On linux.)
2018-07-17 16:47:32 -04:00
Nick Mathewson e2b744ce38 Merge branch 'bug25552_ope_squashed' 2018-07-17 16:19:32 -04:00
George Kadianakis 9e6235d290 Fix time source bug in sr_state_get_start_time_of_current_protocol_run().
The following bug was causing many issues for this branch in chutney:

In sr_state_get_start_time_of_current_protocol_run() we were using the
consensus valid-after to calculate beginning_of_current_round, but we were
using time(NULL) to calculate the current_round slot. This was causing time
sync issues when the consensus valid-after and time(NULL) were disagreeing on
what the current round is. Our fix is to use the consensus valid-after in both
places.

This also means that we are not using 'now' (aka time(NULL)) anymore in that
function, and hence we can remove that argument from the function (and its
callers). I'll do this in the next commit so that we keep things separated.

Furthermore, we fix a unittest that broke.
2018-07-17 15:57:46 -04:00
George Kadianakis 1d2333405e Remove now useless rev counter state file code.
We are not using the state file for rev counters anymore, we just generate them
on the fly!
2018-07-17 15:57:46 -04:00
George Kadianakis 2e8d4139a7 Fix up some unittests by being more careful with the local time.
Now that the rev counter depends on the local time, we need to be more careful
in the unittests. Some unittests were breaking because they were using
consensus values from 1985, but they were not updating the local time
appropriately. That was causing the OPE module to complain that it was trying
to encrypt insanely large values.
2018-07-17 15:57:46 -04:00
Nick Mathewson 3a45f6ffe9 Implementation for a simple order-preserving encryption scheme.
This is meant for use when encrypting the current time within the
period in order to get a monotonically increasing revision counter
without actually revealing our view of the time.

This scheme is far from the most state-of-the-art: don't use it for
anything else without careful analysis by somebody much smarter than
I am.

See ticket #25552 for some rationale for this logic.
2018-07-17 15:57:46 -04:00
Nick Mathewson 304ee896d1 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-17 14:56:52 -04:00
Nick Mathewson 28d1057d56 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-17 14:56:52 -04:00
Nick Mathewson 61a2762e35 Merge branch 'maint-0.2.9' into maint-0.3.2 2018-07-17 14:56:52 -04:00