David Goulet
6ac85ca2b4
prop224: Fix crosscert memory leaks on error
2016-11-04 14:16:42 -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
David Goulet
954fb99a48
Fix a use-after-free error.
2016-11-04 14:07:33 -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
09c750cce3
Check the correct key when checking RSA crosscert in hs_descriptor.c
...
Note that the "signed key" in the signing key certificate is the
signing key. The "signing key" in the signing key certificate is
the key that signs the certificate -- that is, the blinded key.
2016-11-04 13:49:05 -04:00
Nick Mathewson
dbd01590cc
Fix an assertion failure in hs_cache_free_all().
...
It's possible for Tor to decide to exit before it's 100% done
initializing. So, don't assert that the initialization is done.
2016-11-04 13:30:10 -04:00
Nick Mathewson
d88046a80d
Fix compilation.
2016-11-04 13:26:56 -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
Nick Mathewson
c189cb5cc2
Use a better salted-MAC construction in build_mac()
2016-11-04 13:15:28 -04:00
David Goulet
1eed6edf36
prop224: Add a cache free all function
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04 10:32:50 -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
David Goulet
1517a8a2eb
Add EnableOnionServicesV3 consensus parameter
...
This parameter controls if onion services version 3 (first version of prop224)
is enabled or not. If disabled, the tor daemon will not support the protocol
for all components such as relay, directory, service and client. If the
parameter is not found, it's enabled by default.
Closes #19899
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
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
George Kadianakis
f59990f24d
prop224: Directory support for v3 descriptor fetch
...
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
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
cff1fd63f1
prop224: Descriptor decoding implementation
...
Closes #18571
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
91b5d0789f
prop224: Descriptor encoding implementation
...
Add hs_descriptor.{c|h} with the needed ABI to represent a descriptor and
needed component.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:29:27 -04:00
David Goulet
02ad553ccd
prop224: Add new cert type for hidden service
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:29:27 -04:00
David Goulet
15f3563f1b
trunnel: Uncomment link_specifier so we can use it
...
Also add a trunnel definition for link_specifier_list
Signed-off-by: John Brooks <special@torproject.org>
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:29:27 -04:00
David Goulet
e8c12175fe
Move token parsing code to parsecommon.{c|h}
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:29:26 -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
bd6aa4f3d1
Split a wide line
2016-11-03 19:12:18 -04:00
Nick Mathewson
91053a072c
changes file for 20526
2016-11-03 19:10:02 -04:00
Nick Mathewson
e8624b72a8
Merge remote-tracking branch 'dgoulet/bug20526_030_01'
2016-11-03 19:09:42 -04:00
Nick Mathewson
b96bb82a2a
changes file for 19563
2016-11-03 18:41:40 -04:00
Nick Mathewson
80a5091e4f
Merge remote-tracking branch 'mintytoast/bug_19563'
2016-11-03 18:40:41 -04:00
Nick Mathewson
f9b650fca6
Merge branch 'maint-0.2.9'
2016-11-03 18:36:55 -04:00
Nick Mathewson
59f4cae68c
Merge branch 'maint-0.2.8' into maint-0.2.9
2016-11-03 18:36:43 -04:00
Nick Mathewson
61bdc452b0
Merge branch 'bug20551_028' into maint-0.2.8
2016-11-03 18:36:25 -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
Nick Mathewson
0533d14213
Replace some assert(1)s with nonfatal_unreached_once().
...
These were probably supposed to be assert(0).
2016-11-03 16:06:53 -04:00
Nick Mathewson
272572c3a2
Merge branch 'maint-0.2.9'
2016-11-03 15:45:16 -04:00
Nick Mathewson
3cd520a52d
Merge branch 'maint-0.2.8' into maint-0.2.9
2016-11-03 15:44:46 -04:00
Nick Mathewson
7a45ef5a47
Merge remote-tracking branch 'arma/bug19969_028_squashed' into maint-0.2.8
2016-11-03 15:44:30 -04:00
Nick Mathewson
0abaedbf34
Merge branch 'maint-0.2.9'
2016-11-03 15:41:18 -04:00
Nick Mathewson
3bb49c0110
Merge branch 'maint-0.2.8' into maint-0.2.9
2016-11-03 15:41:04 -04:00
overcaffeinated
c4603233db
Add unit test for tor_htonll and tor_ntohll
...
Add tests for tor_htonll and tor_ntohll - fixes bug 19563.
2016-11-03 19:37:59 +00:00
Nick Mathewson
f0b86e30d0
Add assertion that cpath_layer==NULL on OR circ
2016-11-03 14:36:10 -04:00
Nick Mathewson
40487b0141
Merge remote-tracking branch 'dgoulet/bug20376_030_01'
2016-11-03 14:35:03 -04:00
Nick Mathewson
df2615d43d
fix wide lines
2016-11-03 14:29:18 -04:00
Nick Mathewson
16e75587f6
Merge branch 'bug20527_030_01_squashed'
2016-11-03 14:23:47 -04:00