Nick Mathewson
7a0ff5beb2
In conditionvar_timeout test, wait for threads to timeout
...
Previously we just waited 200msec, which was not enough on slow/busy
systems.
Fixes bug 27073; bugfix on 0.2.6.3-alpha when the test was introduced.
2018-09-13 20:47:41 -04:00
Nick Mathewson
b943721b2a
Merge branch 'bug27224_take2_squashed'
2018-09-13 16:43:06 -04:00
Nick Mathewson
874eca6a8c
Add a test case with a matching ip but mismatched identity.
2018-09-13 16:38:33 -04:00
rl1987
9741921094
Unit tests for ticket 27224.
...
Since this is a refactoring ticket, these tests should pass before
and after the changes are made.
2018-09-13 16:25:14 -04:00
Nick Mathewson
e8b81d7dc5
Merge branches 'bug27684' and 'bug27685'
2018-09-13 13:09:57 -04:00
Nick Mathewson
15596f6c0c
Fix a memory leak in tortls/openssl/try_to_extract_certs_from_tls
...
Since this is an "intrusive" test, it only shows up for openssl <1.1
This is a bugfix on 0.3.5.x; bug not in any released Tor.
2018-09-13 12:47:42 -04:00
Nick Mathewson
d28018ea1e
Fix a memory leak in tortls/openssl/context_new test.
...
Bugfix on 0.3.5.x; bugfix not on any released Tor.
2018-09-13 12:43:37 -04:00
Nick Mathewson
f308e81fa7
Merge branch 'maint-0.3.4'
2018-09-12 17:25:40 -04:00
Nick Mathewson
f8d5fb42a3
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-09-12 17:24:41 -04:00
Nick Mathewson
19dbc385d5
Merge remote-tracking branch 'tor-github/pr/298'
2018-09-12 09:38:52 -04:00
Nick Mathewson
62743912bc
Merge branch 'pr278_squashed'
2018-09-12 09:06:35 -04:00
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
Nick Mathewson
8294c40c96
Merge remote-tracking branch 'tor-github/pr/318'
2018-09-12 08:12:19 -04:00
cypherpunks
e9ef7d5ab4
test/protover: remove version zero from tests
...
This isn't legal according to dir-spec.txt.
We can write separate tests for it if the spec
is changed to make it legal.
2018-09-12 02:47:29 +00:00
Nick Mathewson
5a2374b074
Merge remote-tracking branch 'tor-github/pr/315'
2018-09-11 15:55:30 -04:00
Nick Mathewson
75ad1a1f2f
Merge remote-tracking branch 'onionk/doublevote1'
2018-09-11 13:16:49 -04:00
Taylor Yu
617160895c
Defer reporting directory bootstrap progress
...
Existing cached directory information can cause misleadingly high
bootstrap percentages. To improve user experience, defer reporting of
directory information progress until at least one connection has
succeeded to a relay or bridge.
Closes ticket 27169.
2018-09-10 15:20:50 -05:00
David Goulet
7ff67d0e90
test: Fix coverity CID 1439129
...
One HSv3 unit test used "tor_memeq()" without checking the return value. This
commit changes that to use "tt_mem_op()" to actually make the test validate
something :).
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-10 10:28:35 -04:00
David Goulet
064d3e7497
test: Fix coverity CID 1439130
...
Trivial fix of removing an uneeded NULL check in an HS v3 unit test.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-10 10:22:31 -04:00
David Goulet
58d74ad943
test: Fix coverity CID 1439131
...
Simple uninitialized object that we could free in an HS v3 unit test.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-10 10:20:58 -04:00
Nick Mathewson
9ca1af9a87
Merge remote-tracking branch 'dgoulet/ticket20700_035_03'
2018-09-07 15:03:32 -04:00
George Kadianakis
3695ef6343
HSv3: Don't assert when reading bad client-side privkeys.
2018-09-07 14:05:07 -04:00
George Kadianakis
1e9428dc61
HSv3: Add subcredential in client auth KDF on the service-side.
...
Also update some client auth test vectors that broke...
2018-09-07 14:05:07 -04:00
David Goulet
c76d00abfa
hs-v3: Make hs_desc_build_fake_authorized_client() return an object
...
Return a newly allocated fake client authorization object instead of taking
the object as a parameter.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 14:03:55 -04:00
Suphanat Chunhapanya
5e1d36c7db
bug: Use PATH_SEPARATOR instead of slash
...
In function get_fname_suffix, previously it uses /, but in fact it
should use PATH_SEPARATOR.
2018-09-07 14:03:55 -04:00
Suphanat Chunhapanya
83c8419e73
hs-v3: Rename client_pk to client_auth_pk
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 14:03:08 -04:00
Suphanat Chunhapanya
9f975e9995
hs-v3: Rename client_sk to client_auth_sk
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 14:03:07 -04:00
Suphanat Chunhapanya
b61403c787
test: HS v3 client auth is config equal function
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 14:02:43 -04:00
Suphanat Chunhapanya
3b08b23997
hs-v3: Make all descriptor content free functions public
...
Series of functions that we now need in hs_service.c.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 14:02:43 -04:00
Suphanat Chunhapanya
69fb25b0f6
test: HS v3 descriptor decoding with client authorization
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 14:02:43 -04:00
Suphanat Chunhapanya
63576b0166
hs-v3: Refactor the descriptor decryption/decoding
...
This commit refactors the existing decryption code to make it compatible with
a new logic for when the client authorization is enabled.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 13:59:22 -04:00
Suphanat Chunhapanya
9c36219236
test: HS v3 client authorization loading secret key
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 13:59:22 -04:00
Suphanat Chunhapanya
fd6bec923c
test: HS v3 descriptor encoding with client authorization
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 13:59:22 -04:00
Suphanat Chunhapanya
fa50aee366
hs-v3: Encrypt the descriptor using a cookie
...
Previously, we encrypted the descriptor without the descriptor cookie. This
commit, when the client auth is enabled, the descriptor cookie is always used.
I also removed the code that is used to generate fake auth clients because it
will not be used anymore.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 13:59:22 -04:00
Suphanat Chunhapanya
10f4c46e50
test: Build an HSv3 descriptor with authorized client
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 13:59:22 -04:00
Suphanat Chunhapanya
0dab4ac2dd
test: HS v3 building a descriptor with client auth
...
This commit tests that the descriptor building result, when the client
authorization is enabled, includes everything that is needed.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 13:59:22 -04:00
Suphanat Chunhapanya
15af47ede0
test: HS v3 loading client auth keys service side
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 13:59:22 -04:00
Nick Mathewson
8815960c46
Merge remote-tracking branch 'tor-github/pr/294'
2018-09-06 09:47:32 -04:00
Nick Mathewson
3b61bdb5ae
Try to fix new coverity warnings in unit tests.
2018-09-05 08:30:35 -04:00
Nick Mathewson
03efb67b42
Debug one last reference-counting issue that only appeared on openssl master
2018-09-04 20:46:46 -04:00
Nick Mathewson
eeba944ee0
Fix an easy refcounting bug in a unit test
2018-09-04 20:25:25 -04:00
Nick Mathewson
0db5c54957
Merge branch 'nss_squashed' into nss_merge
2018-09-04 20:21:07 -04:00
Nick Mathewson
d644c93ae9
Resolve openssl-only memory leaks
2018-09-04 19:45:28 -04:00
Nick Mathewson
c50537fd94
Fix a pair of remaining leaks in tortls_nss.c
...
Fun fact: PR_Close leaks memory if its socket is not valid.
2018-09-04 19:45:21 -04:00
Nick Mathewson
274efb1263
Use FREE_AND_NULL for impl types
2018-09-04 14:52:35 -04:00