summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2017-12-08Update free functions into macros: src/or/ part 1Nick Mathewson
This covers addressmap.h (no change needed) through confparse.h
2017-12-08Convert the rest of src/common's headers to use FREE_AND_NULLNick Mathewson
2017-11-17Make all the free() functions from container.h clear their targetsNick Mathewson
2017-11-17Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-17Fix a clang unitialized-var warningNick Mathewson
2017-11-17Intoduce unittest for skipping outdated dirservers.George Kadianakis
2017-11-11Merge branch 'bug24247_032'Nick Mathewson
2017-11-11Fix mock_crypto_pk_public_checksig__nocheck() to handle short RSA keysNick Mathewson
This function -- a mock replacement used only for fuzzing -- would have a buffer overflow if it got an RSA key whose modulus was under 20 bytes long. Fortunately, Tor itself does not appear to have a bug here. Fixes bug 24247; bugfix on 0.3.0.3-alpha when fuzzing was introduced. Found by OSS-Fuzz; this is OSS-Fuzz issue 4177.
2017-11-09Fix unit test behavior: we need to be in STATE_LIVE.Nick Mathewson
2017-11-09Merge branch 'ticket20895'Nick Mathewson
2017-11-08Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-08Merge branch 'bug23816_029_squashed' into maint-0.3.2Nick Mathewson
2017-11-08Replace our random-exponential-delay algorithm.Nick Mathewson
This patch has implementations of the "decorrelated" and "full" algorithms from https://www.awsarchitectureblog.com/2015/03/backoff.html
2017-11-07Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-07Merge remote-tracking branch 'asn/ticket23623_032_01' into maint-0.3.2Nick Mathewson
2017-11-06Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-06Merge branch 'bug24150_032_squashed' into maint-0.3.2Nick Mathewson
2017-11-06Fix a memory leak on decryption non-failure of v3 hsdescNick Mathewson
If it decrypts something that turns out to start with a NUL byte, then decrypt_desc_layer() will return 0 to indicate the length of its result. But 0 also indicates an error, which causes the result not to be freed by decrypt_desc_layer()'s callers. Since we're trying to stabilize 0.3.2.x, I've opted for the simpler possible fix here and made it so that an empty decrypted string will also count as an error. Fixes bug 24150 and OSS-Fuzz issue 3994. The original bug was present but unreachable in 0.3.1.1-alpha. I'm calling this a bugfix on 0.3.2.1-alpha since that's the first version where you could actually try to decrypt these descriptors.
2017-11-06Merge remote-tracking branch 'dgoulet/bug24053_033_01'Nick Mathewson
2017-11-05Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-04ClientDNSRejectInternalAddresses in non-default networksSebastian Hahn
Once again allow the flag to be set, unless the default network is used. Thanks to nickm for a suggestion for the workaround to a test failure.
2017-11-04Revert "Make ClientDNSRejectInternalAddresses testing-only."Sebastian Hahn
This reverts commit 27fa4a98d23972213122fa99499efa4baebe49e3.
2017-11-02Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-02Test that IPv6-only clients can use microdescriptorsteor
When running "make test-network-all", test that IPv6-only clients can use microdescriptors. IPv6-only microdescriptor client support was fixed in tor 0.3.0.1-alpha. Requires chutney master 61c28b9 or later. Closes ticket 24109.
2017-11-02Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-02Merge branch 'ticket23820_032_01_squashed' into maint-0.3.2Nick Mathewson
2017-11-02Don't run IPv6-only v3 single onion service tests using chutneyteor
Part of #23820.
2017-11-01Merge branch 'tor_api_squashed'Nick Mathewson
2017-11-01test: Fix SR initialization in routerlist testDavid Goulet
Fixes #24053 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31test: Fix voting schedule for hs_service.cDavid Goulet
Part of #23623 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31test: Fix voting schedule for hs_common.cDavid Goulet
Part of #23623 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31test: Fix voting schedule for shared randomDavid Goulet
Part of #23623 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31Merge branch 'maint-0.3.2'Nick Mathewson
2017-10-31Merge branch 'bug24082_032' into maint-0.3.2Nick Mathewson
2017-10-31test: Initialize the voting schedule in test_dir.cDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31Merge branch 'maint-0.3.2'Nick Mathewson
2017-10-31Merge branch 'hsdescv3_fuzz_more' into maint-0.3.2Nick Mathewson
2017-10-31Merge branch 'fix-torrcd-sandbox-22605v2'Nick Mathewson
2017-10-31Merge branch 'maint-0.3.2'Nick Mathewson
2017-10-31Merge branch 'bug23762_032_02_squashed' into maint-0.3.2Nick Mathewson
2017-10-31hs-v3: Attempt descriptor refetch when dirinfo changesDavid Goulet
When the directory information changes, callback to the HS client subsystem so it can check if any pending SOCKS connections are waiting for a descriptor. If yes, attempt a refetch for those. Fixes #23762 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-30Initialize the mock options in the fuzzing codeNick Mathewson
Fixes bug 24082; bugfix on 0.3.0.3-alpha. Found by Brian Carpenter.
2017-10-27In the hsdescv3 fuzzer, replace the decryption function.Nick Mathewson
The new decryption function performs no decryption, skips the salt, and doesn't check the mac. This allows us to fuzz the hs_descriptor.c code using unencrypted descriptor test, and exercise more of the code. Related to 21509.
2017-10-27Allow test_rust.sh to run from outside the makefileNick Mathewson
(This is just a matter of making sure that we handle the case where abs_top_builddir is not set)
2017-10-27Merge remote-tracking branch 'public/exit_carefully'Nick Mathewson
2017-10-27Make sure all C files have copyright/license noticesNick Mathewson
2017-10-27Merge branch 'protover-rust-impl_squashed'Nick Mathewson
2017-10-27move to allocating c strings from rustChelsea Holland Komlo
2017-10-27rust implementation of protoverChelsea Holland Komlo
2017-10-27sr: Don't use a dynamic voting scheduleDavid Goulet
The exposed get_voting_schedule() allocates and return a new object everytime it is called leading to an awful lot of memory allocation when getting the start time of the current round which is done for each node in the consensus. Closes #23623 Signed-off-by: David Goulet <dgoulet@torproject.org>