Commit Graph

1994 Commits

Author SHA1 Message Date
Chelsea H. Komlo afb6ae7b0f Refactor circuit_predict_and_launch_new 2016-11-24 08:12:30 -05:00
Chelsea H. Komlo b95998ef0c moving useful test helper to test_helpers.h 2016-11-24 08:12:27 -05:00
Nick Mathewson c35d481f56 Merge branch 'maint-0.2.9' 2016-11-21 12:44:21 -05:00
Nick Mathewson e2c881487c Merge remote-tracking branch 'arma/bug20423' into maint-0.2.9 2016-11-21 12:40:08 -05:00
Nick Mathewson 427dcb29b5 Merge branch 'maint-0.2.9' 2016-11-17 20:08:15 -05:00
Roger Dingledine 3bb40b213b refactor router_pick_published_address to have another arg
no change in behavior except fewer log entries in the case where we use
a cached result.
2016-11-16 16:13:03 -05:00
teor 150a2b39b0 fixup! Add expect_log_msg_containing_either3() and expect_log_msg_containing_either4()
Fix typos:
    * extra '('
    * use assert_log_predicate (without 3 or 4 at the end)

Tidy whitespace.
Wrap long lines.
2016-11-16 13:14:00 +11:00
Neel Chauhan 0825fc6af9 Add all four error messages to test_address_get_if_addrs6_list_no_internal() 2016-11-16 12:57:13 +11:00
Neel Chauhan 01492d3869 Add all four error messages to test_address_get_if_addrs6_list_internal() 2016-11-16 12:57:09 +11:00
Neel Chauhan cccc08ad56 Add expect_log_msg_containing_either3() and expect_log_msg_containing_either4() 2016-11-16 12:57:05 +11:00
Nick Mathewson 0980787f91 Merge remote-tracking branch 'dgoulet/bug20570_030_01' 2016-11-10 09:28:31 -05:00
Nick Mathewson 217b895831 Merge remote-tracking branch 'dgoulet/ticket19642_030_01' 2016-11-10 09:16:00 -05:00
Nick Mathewson c58592e658 Merge branch 'maint-0.2.9' 2016-11-08 18:51:19 -05:00
Nick Mathewson 89ec191b68 Merge remote-tracking branch 'public/bug20306_029' into maint-0.2.9 2016-11-08 18:51:07 -05:00
David Goulet 34f14a35b6 hs: Add single-onion-service line to v3 descriptor
This field indicates if the service is a Single Onion Service if present in
the descriptor.

Closes #19642

Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-08 13:22:42 -05:00
Nick Mathewson 3e3040a5d9 Merge branch 'maint-0.2.9'
Conflicts:
	src/or/rendservice.c
2016-11-07 16:31:40 -05:00
Nick Mathewson c2fc0941a5 Merge remote-tracking branch 'teor/bug20484_029_v2' into maint-0.2.9 2016-11-07 16:12:13 -05:00
Nick Mathewson 7236e42684 Merge branch 'maint-0.2.9' 2016-11-07 16:10:55 -05:00
Nick Mathewson e482541cfb Fix another 20499-broken test 2016-11-07 16:10:42 -05:00
Nick Mathewson d2071c36f6 Fix a unit test (broken by recent 20499 hacking) 2016-11-07 16:02:55 -05:00
David Goulet 18e0a0b70d test: Remove useless HS decode multiple intro points
The test was broken and skipped because the hardcoded cross certificate didn't
include the dynamically generated signing key generated by the test. The only
way we could have fixed that is extracting the signing key from the hardcoded
string and put it in the descriptor object or dynamically generate the cross
certificate.

In the end, all this was kind of pointless as we already test the decoding of
multiple introduction points elsewhere and we don't gain anything with that
specific test thus the removal.

Fixes #20570

Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-07 10:59:30 -05:00
Nick Mathewson 61612f980d Merge branch 'maint-0.2.9' 2016-11-06 20:24:29 -05:00
Nick Mathewson def41e93bd In test_tortls_classify_client_ciphers(), s/ECDH/ECDHE/
(We weren't actually using these ciphers; we were just requing that
ciphers of that name existed.)

Patch from rubiate.  Fixes 20460
2016-11-06 20:23:40 -05:00
Nick Mathewson 0fed324c2c Would you believe me if I said there were more 32-bit and clang warnings? 2016-11-04 15:47:28 -04:00
Nick Mathewson f45a581486 Fix some 32-bit warnings and clang warnings 2016-11-04 15:24:30 -04:00
David Goulet c1bbc8405b prop224: Fix memleaks in hs descriptor unit test
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04 14:47:09 -04:00
Nick Mathewson 7a78a37f1d Fix memory leaks in test_hs_cache.c 2016-11-04 14:39:35 -04:00
Nick Mathewson ed4aebcd97 Fix more unit test leaks. 2016-11-04 14:35:15 -04:00
David Goulet 791625750e prop224: Remove pointless unit test
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04 14:31:28 -04:00
Nick Mathewson 1a03edefba Fix a heap overrun in test_decode_plaintext 2016-11-04 14:28:19 -04:00
Nick Mathewson d16b4b3e48 Fix memory leaks in hs_descriptor/decode_descriptor and in encode_enc_key() 2016-11-04 14:27:45 -04:00
Nick Mathewson a4291eef5a Expose desc_intro_point_free to the tests, and use it.
Also fix another couple of leaks.
2016-11-04 14:22:04 -04:00
Nick Mathewson 29ae8dcf96 Fix a bunch of leaks in hs_cache/upload_and_download_hs_desc 2016-11-04 14:13:30 -04:00
Nick Mathewson 6847b9f6af Fix make check-spaces 2016-11-04 14:00:08 -04:00
Nick Mathewson 0e2df2b653 Tell a broken test to skip itself 2016-11-04 13:57:07 -04:00
David Goulet b876e5128a prop224: fix unit test to actually initialize a connection object
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04 13:53:20 -04:00
Nick Mathewson c35c43d7d9 Merge branch 'ticket17238_029_02-resquash'
Conflicts:
	src/or/rendclient.c
	src/or/rendcommon.c
	src/or/routerparse.c
	src/test/test_dir.c
	src/trunnel/ed25519_cert.h
2016-11-04 13:26:37 -04:00
David Goulet 3f29688bdf prop224: Use a const pointer for the cache lookup entry
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04 10:32:50 -04:00
David Goulet 1263f74a12 prop224: Rename cert type to follow naming convention
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04 10:32:50 -04:00
George Kadianakis d795ed5871 Make check-spaces happy :)
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:32:50 -04:00
George Kadianakis a8efd087bd test: Add prop224 directory fetch/upload unit tests
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:32:50 -04:00
David Goulet 45a72356cb prop224: Directory support for v3 descriptor publishing
Closes #19205

Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:32:49 -04:00
David Goulet 1aeaba4906 test: Add prop224 directory cache unit tests
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:32:49 -04:00
David Goulet 025610612d prop224: Directory cache support
This implements the proposal 224 directory descriptor cache store and lookup
functionalities. Furthermore, it merges the OOM call for the HSDir cache with
current protocol v2 and the new upcoming v3.

Add hs_cache.{c|h} with store/lookup API.

Closes #18572

Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:31:35 -04:00
David Goulet 473f99bf7b test: Add prop224 descriptor unit tests
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:29:28 -04:00
David Goulet 8293356ad9 hs: Refactor rend_data_t for multi version support
In order to implement proposal 224, we need the data structure rend_data_t to
be able to accomodate versionning that is the current version of hidden
service (2) and the new version (3) and future version.

For that, we implement a series of accessors and a downcast function to get
the v2 data structure. rend_data_t becomes a top level generic place holder.

The entire rend_data_t API has been moved to hs_common.{c|h} in order to
seperate code that is shared from between HS versions and unshared code (in
rendcommon.c).

Closes #19024

Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:29:26 -04:00
Nick Mathewson 80a5091e4f Merge remote-tracking branch 'mintytoast/bug_19563' 2016-11-03 18:40:41 -04:00
Nick Mathewson 63c94954b1 Fix BUG message in channel/queue_impossible 2016-11-03 18:34:44 -04:00
overcaffeinated dce4603d9b Use tor_htonll in test_util_format_unaligned_accessors
Remove the inline htonll, switch to tor_htonll for
test_util_format_unaligned_accessors.
2016-11-03 21:18:02 +00:00
overcaffeinated c613446ca2 Refactor tests for tor_htonll and tor_ntohll
Following kind feedback from dgoulet: add tests for min (0) and
max (UINT64_MAX) values. Rename expected results to something more
sensible than 'n'.
2016-11-03 20:52:11 +00:00