summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-04Merge branch 'ticket17238_029_02-resquash'Nick Mathewson
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-04Use a better salted-MAC construction in build_mac()Nick Mathewson
2016-11-04prop224: Add a cache free all functionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04prop224: Use a const pointer for the cache lookup entryDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04prop224: Rename cert type to follow naming conventionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04Add EnableOnionServicesV3 consensus parameterDavid Goulet
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-04Make check-spaces happy :)George Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04test: Add prop224 directory fetch/upload unit testsGeorge Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Directory support for v3 descriptor fetchGeorge Kadianakis
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Directory support for v3 descriptor publishingDavid Goulet
Closes #19205 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04test: Add prop224 directory cache unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Directory cache supportDavid Goulet
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-04test: Add prop224 descriptor unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Descriptor decoding implementationDavid Goulet
Closes #18571 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04prop224: Descriptor encoding implementationDavid Goulet
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-04prop224: Add new cert type for hidden serviceDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04trunnel: Uncomment link_specifier so we can use itDavid Goulet
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-04Move token parsing code to parsecommon.{c|h}David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04hs: Refactor rend_data_t for multi version supportDavid Goulet
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-03Split a wide lineNick Mathewson
2016-11-03changes file for 20526Nick Mathewson
2016-11-03Merge remote-tracking branch 'dgoulet/bug20526_030_01'Nick Mathewson
2016-11-03changes file for 19563Nick Mathewson
2016-11-03Merge remote-tracking branch 'mintytoast/bug_19563'Nick Mathewson
2016-11-03Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-03Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-11-03Merge branch 'bug20551_028' into maint-0.2.8Nick Mathewson
2016-11-03Fix BUG message in channel/queue_impossibleNick Mathewson
2016-11-03Use tor_htonll in test_util_format_unaligned_accessorsovercaffeinated
Remove the inline htonll, switch to tor_htonll for test_util_format_unaligned_accessors.
2016-11-03Refactor tests for tor_htonll and tor_ntohllovercaffeinated
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-03Replace some assert(1)s with nonfatal_unreached_once().Nick Mathewson
These were probably supposed to be assert(0).
2016-11-03Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-03Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-11-03Merge remote-tracking branch 'arma/bug19969_028_squashed' into maint-0.2.8Nick Mathewson
2016-11-03Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-03Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-11-03Add unit test for tor_htonll and tor_ntohllovercaffeinated
Add tests for tor_htonll and tor_ntohll - fixes bug 19563.
2016-11-03Add assertion that cpath_layer==NULL on OR circNick Mathewson
2016-11-03Merge remote-tracking branch 'dgoulet/bug20376_030_01'Nick Mathewson
2016-11-03fix wide linesNick Mathewson
2016-11-03Merge branch 'bug20527_030_01_squashed'Nick Mathewson
2016-11-03hs: Escape service directories before printing themIvan Markin
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-03Fix two warnings in test_link_handshake.cNick Mathewson
One is fixed by disabling the -Wredundant-decls warnings around openssl headers here, because of the old double-declaration of SSL_get_selected_srtp_profile(). One is fixed by including compat.h before or.h so that we get the winsock2.h include before the windows.h include.
2016-11-03Merge branch 'bug20553_028'Nick Mathewson
2016-11-03Work around a behavior change in openssl's BUF_MEM codeNick Mathewson
In our code to write public keys to a string, for some unfathomable reason since 253f0f160e1185c, we would allocate a memory BIO, then set the NOCLOSE flag on it, extract its memory buffer, and free it. Then a little while later we'd free the memory buffer with BUF_MEM_free(). As of openssl 1.1 this doesn't work any more, since there is now a BIO_BUF_MEM structure that wraps the BUF_MEM structure. This BIO_BUF_MEM doesn't get freed in our code. So, we had a memory leak! Is this an openssl bug? Maybe. But our code was already pretty silly. Why mess around with the NOCLOSE flag here when we can just keep the BIO object around until we don't need the buffer any more? Fixes bug 20553; bugfix on 0.0.2pre8
2016-11-03Merge branch 'bug20551_028'Nick Mathewson
2016-11-03Use explicit casts to avoid warnings when building with openssl 1.1Nick Mathewson
fixes bug 20551; bugfix on 0.2.1.1-alpha
2016-11-03whitespace fixesNick Mathewson
2016-11-03Merge branch 'feature_15055_v2'Nick Mathewson
2016-11-03Audit use of tor_tls_cert_get_key().Nick Mathewson
This function is allowed to return NULL if the certified key isn't RSA. But in a couple of places we were treating this as a bug or internal error, and in one other place we weren't checking for it at all! Caught by Isis during code review for #15055. The serious bug was only on the 15055 branch, thank goodness.