George Kadianakis
da15feb0d3
Refresh OB keys when we build a new descriptor.
...
We now assign OB subcredentials to the service instead of computing them on the
spot. See hs_ob_refresh_keys() for more details.
2020-01-28 01:07:28 +02:00
Taylor Yu
76a8a734c9
tests for ticket 33039
2020-01-24 12:20:52 -06:00
Taylor Yu
f7a2b98674
fix leak in GETCONF
...
Fix a memory leak introduced by refactoring of control reply
formatting code. Fixes bug 33039; bugfix on 0.4.3.1-alpha.
2020-01-24 12:20:47 -06:00
Nick Mathewson
e34d963c44
Bump to 0.4.3.1-alpha-dev
2020-01-22 20:30:46 -05:00
David Goulet
21d0d81d82
Merge branch 'tor-github/pr/1677'
2020-01-22 14:32:30 -05:00
Alexander Færøy
35721b38e4
Lower log level of standard error messages from PT's.
...
This patch lowers the log level of error messages from PT processes from
warning to debug.
See: https://bugs.torproject.org/33005
2020-01-22 14:32:13 -05:00
teor
08efb28743
dir_connection_t: Explain dirconn_direct better
...
Direct connections can use a DirPort or ORPort.
Indirect connections must use a multi-hop Tor circuit.
Comment-only changes.
2020-01-22 09:27:40 +10:00
Nick Mathewson
e144134294
Bump to 0.4.3.1-alpha
2020-01-21 12:33:05 -05:00
Nick Mathewson
942543253a
Use time-invariant conditional memcpy to make onionbalance loop safer
2020-01-21 10:31:36 -05:00
Nick Mathewson
4269ab97c6
Add a function to maybe memcpy() a value, in constant time.
2020-01-21 10:31:36 -05:00
Nick Mathewson
b6250236a2
Pass multiple subcredentials all the way down to hs_ntor.
...
This approach saves us a pair of curve25519 operations for every
subcredential but the first. It is not yet constant-time.
I've noted a few places where IMO we should refactor the code so
that the complete list of subcredentials is passed in earlier.
2020-01-21 10:31:36 -05:00
Nick Mathewson
46e6a4819a
Define a variant of hs_ntor that takes multiple subcredentials.
2020-01-21 10:31:29 -05:00
Nick Mathewson
bd0efb2702
Remove a dead BUG() check.
2020-01-21 10:31:29 -05:00
Nick Mathewson
4532c7ef6a
Turn hs_subcredential_t into a proper struct.
2020-01-21 10:31:29 -05:00
David Goulet
7c18860c3e
test: Add HS onion balance tests
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-21 10:31:29 -05:00
David Goulet
faada6af8d
hs-v3: Implement hs_ob_service_is_instance()
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-21 10:31:29 -05:00
David Goulet
780e498f76
hs-v3: Code improvement for INTRO2 MAC validation
...
Pointed by nickm during the review of #32709 .
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-21 10:31:29 -05:00
David Goulet
02f1caa583
hs-v3: Validate INTRO2 cells for onion balance
...
Closes #32709
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-21 10:31:29 -05:00
David Goulet
ef28afa255
hs-v3: Add the Onion Balance config file option
...
At this commit, the service reads the config file and parse it to finally set
the service config object with the options.
Part of #32709
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-21 10:31:29 -05:00
George Kadianakis
f1498e75dd
hs-v3: Extract INTRO2 key computation to its own function.
...
Part of #32709
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-21 10:28:26 -05:00
David Goulet
16a201e703
hs-v3: Implement hs_parse_address_no_log()
...
The hs_parse_address() can not be used without an options_t object existing
since on error it uses the escaped_safe_str() that looks at the options.
This new function won't log and returns an error message in case of failure
that can then be used to log.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-21 10:28:26 -05:00
David Goulet
ff93133403
Merge branch 'tor-github/pr/1675'
2020-01-20 10:47:49 -05:00
David Goulet
ca8b90a843
Merge branch 'tor-github/pr/1668'
2020-01-20 10:44:03 -05:00
teor
bf2a399fc0
config: Make clients tell dual-stack exits they prefer IPv6
...
Make Tor clients tell dual-stack exits that they prefer IPv6
connections.
This change is equivalent to setting the PreferIPv6 flag on
SOCKSPorts (and most other listener ports). Tor Browser has
been setting this flag for some time, and we want to remove a
client distinguisher at exits.
Also update the man page, putting all the IP flags in their
non-default forms.
Closes ticket 32637.
2020-01-20 16:36:58 +10:00
teor
b23b8fa4a1
Merge remote-tracking branch 'tor-github/pr/1673'
2020-01-20 15:52:40 +10:00
teor
af30be9515
test/nodelist: Remove ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD
...
When we removed obsolete consensus methods in 32695, we also
removed ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD, so we need to
remove it from the routerstatus format tests.
Part of 20218.
2020-01-20 15:51:30 +10:00
teor
3851128e88
Merge branch 'ticket20218_rebased_squashed' into ticket20218_merged
...
* ticket 32695 removed networkstatus_consensus_has_ipv6(),
keep that change in master.
* ticket 20218 modifies the function name and comment for
routerstatus_has_visibly_changed(), keep that change
in ticket20218_rebased_squashed.
2020-01-20 15:50:54 +10:00
Nick Mathewson
4541289f2a
Rename test to match new identifier.
2020-01-20 15:48:52 +10:00
Nick Mathewson
e2637214f2
split a wide line
2020-01-20 15:48:49 +10:00
Nick Mathewson
152cbf2a59
Rename routerstatus_has_changed to routerstatus_has_visibly_changed
...
This is an automated commit, generated by this command:
./scripts/maint/rename_c_identifier.py \
routerstatus_has_changed routerstatus_has_visibly_changed
It was generated with --no-verify, since it introduces a wide line.
I'll fix it in a subsequent commit.
2020-01-20 15:48:45 +10:00
Nick Mathewson
c3633e6b29
Update routerstatus_has_changed tests.
...
Now they also check whether output of routerstatus_format_entry()
has changed.
2020-01-20 15:48:41 +10:00
Nick Mathewson
702a753cf3
Add unit test for routerstatus_has_changed()
2020-01-20 15:48:25 +10:00
teor
0b82b5ee42
Merge remote-tracking branch 'tor-github/pr/1671'
2020-01-20 15:40:42 +10:00
Nick Mathewson
5086b16055
Merge remote-tracking branch 'tor-github/pr/1529'
2020-01-17 08:49:56 -05:00
Nick Mathewson
c8b6392b4e
Initialize publish/subscribe code when running as an NT service.
...
Fixes bug 32778; bugfix on 0.4.1.1-alpha.
2020-01-17 08:41:52 -05:00
Nick Mathewson
d7a22160f5
Revert "Restore feature where nt-services detect non-"run_tor" modes."
...
This reverts commit 5c240db0bf
.
2020-01-17 08:39:49 -05:00
Nick Mathewson
7f03ba06d8
Merge branch 'ticket32806'
2020-01-17 08:37:33 -05:00
Nick Mathewson
6d2b9c9631
Remove some dead checks
...
The only code that could set these options to be negative was in the
unit tests.
2020-01-17 08:31:22 -05:00
Nick Mathewson
648e1afc33
fix a stray asterisk in a comment
2020-01-17 08:25:09 -05:00
Nick Mathewson
abd9ae48ac
Merge branch 'ticket32487_squashed_and_merged'
2020-01-17 07:50:50 -05:00
Nick Mathewson
01fdc3240f
Merge branch 'ticket32695_squashed'
2020-01-16 16:42:01 -05:00
Nick Mathewson
ceacda44f1
Remove functions that checked for pre-ipv6 consensus.
...
We no longer need or need to test:
* node_awaiting_ipv6()
* networkstatus_consensus_has_ipv6().
2020-01-16 16:41:53 -05:00
Nick Mathewson
8d94bcbf8c
Remove routerstatus_format_entry() consensus_method argument as unused
2020-01-16 16:41:53 -05:00
Nick Mathewson
441a048a3a
Remove support for now-obsolete consensus methods before 28.
...
Closes ticket 32695.
2020-01-16 16:41:53 -05:00
Nick Mathewson
60a0d7d1e8
expose routerstatus_has_changed to unit tests.
2020-01-16 12:14:12 -05:00
Victor Nepveu
594e5ce635
Refactor routerstatus_has_changed function
...
- Check all fields that might change in a routerstatus
- Document the refactoring
Signed-off-by: Victor Nepveu <victor.nepveu@imt-atlantique.net>
2020-01-16 10:39:15 -05:00
Nick Mathewson
17c63ff9f6
Merge remote-tracking branch 'tor-github/pr/1663'
2020-01-16 10:24:39 -05:00
Nick Mathewson
3c89622e39
Merge branch 'ticket32487_squashed' into ticket32487_squashed_and_merged
...
Resolved conflicts in src/core/include.am
2020-01-16 07:57:37 -05:00
Nick Mathewson
efb301c86c
Document why dircache is not included in --list-modules
2020-01-16 07:48:17 -05:00
Nick Mathewson
a623a49777
Add have_module_dircache().
2020-01-16 07:48:17 -05:00