Nick Mathewson
4ef42e7c52
Refactor ...compute_authenticate_cell_body() to return a var_cell_t.
...
This means we don't need to precompute the length.
Helps simplify the implementation of 19156.
2016-11-03 08:37:21 -04:00
Nick Mathewson
2bf6553949
Code to send correct authentication data when we are using AUTHTYPE>2
...
Implements the major part of 19156, except doesn't actually send the
new cell type yet.
2016-11-03 08:37:21 -04:00
Nick Mathewson
b004ff45d7
New authentication types to use RFC5705.
...
See proposal 244. This feature lets us stop looking at the internals
of SSL objects, *and* should let us port better to more SSL libraries,
if they have RFC5705 support.
Preparatory for #19156
2016-11-03 08:37:20 -04:00
Nick Mathewson
fdd8f8df67
Send ed25519 certificates in certs cell, when we have them.
...
Implements 19155 (send CERTS cells correctly for Ed25519)
Also send RSA->Ed crosscert
2016-11-03 08:37:16 -04:00
Nick Mathewson
5205e95275
Refactor connection_or_send_certs_cell() to use trunnel
...
We no longer generate certs cells by pasting the certs together one
by one. Instead we use trunnel to generate them.
Preliminary work for 19155 (send CERTS cell with ed certs)
2016-11-03 08:35:40 -04:00
Nick Mathewson
986695fb74
When parsing certs cells, allow more certs types
...
Implements the parsing part of #19157
2016-11-03 08:35:36 -04:00
Ivan Markin
922bc45a56
hs: Added rend_service_is_ephemeral() and made related code use it
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-02 10:01:35 -04:00
Nick Mathewson
b2f82d45b7
Always call connection_ap_attach_pending() once a second.
...
Fixes bug 19969; bugfix on b1d56fc58
. We can fix this some more in
later Tors, but for now, this is probably the simplest fix possible.
This is a belt-and-suspenders fix, where the earlier fix ("Ask
event_base_loop to finish when we add a pending stream") aims to respond
to new streams as soon as they arrive, and this one aims to make sure
that we definitely respond to all of the streams.
2016-11-01 20:09:44 -04:00
Roger Dingledine
d89804a69d
Ask event_base_loop to finish when we add a pending stream
...
Fixes bug 19969; bugfix on b1d56fc58
. We can fix this some more in
later Tors, but for now, this is probably the right fix for us.
2016-11-01 19:52:55 -04:00
Roger Dingledine
28b755e660
refactor out the tor_event_base_loopexit() call
...
no actual changes
2016-11-01 19:52:54 -04:00
Nick Mathewson
25f53955f6
Merge branch 'maint-0.2.9'
2016-11-01 13:32:29 -04:00
Nick Mathewson
ff3e08f2af
Attempt to fix unit tests on netbsd
2016-11-01 13:32:21 -04:00
Nick Mathewson
cb35a7c271
Merge branch 'maint-0.2.9'
2016-11-01 13:05:45 -04:00
Nick Mathewson
733b245283
Merge remote-tracking branch 'teor/bug20472-029-v2' into maint-0.2.9
2016-11-01 13:05:33 -04:00
Nick Mathewson
68a27dad43
Merge branch 'maint-0.2.9'
2016-10-31 16:33:12 -04:00
Nick Mathewson
e712b5d784
Merge branch 'bug19968_029' into maint-0.2.9
2016-10-31 16:33:03 -04:00
Nick Mathewson
1d76d38903
Re-run trunnel.
2016-10-31 16:25:34 -04:00
David Goulet
0fa671843e
prop224: Add INTRODUCE1 and INTRODUCE_ACK trunnel definition
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-10-31 16:24:30 -04:00
David Goulet
f22eb2730c
prop224: Add ESTABLISH_INTRO and INTRO_ESTABLISHED trunnel definition
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-10-31 16:03:28 -04:00
Nick Mathewson
59a78187cd
Merge branch 'maint-0.2.9'
2016-10-31 15:20:45 -04:00
Nick Mathewson
24b7b922ae
Actually free the worker_state_t object when we do an update with it
...
Previously we freed the old "keys" object, but leaked the
worker_state_t that we had taken it from.
Fixes bug 20401; bugfix on 0.2.6.3-alpha.
2016-10-31 15:20:25 -04:00
Nick Mathewson
becc957839
Actually clamp the number of detected CPUs to 16.
...
Previously we said we did, but didn't.
Fixes #19968 ; bugfix on 0.2.3.1-alpha.
2016-10-31 14:19:39 -04:00
teor
3158777d35
Rename routerstatus_version_supports_ntor to *_supports_extend2_cells
...
This helps avoid the confusion that caused bug 20472.
Bugfix on commit 10aa913
from #19163 in tor-0.2.9.3-alpha.
2016-10-31 17:02:21 +11:00
teor
d81f2b5d81
Refactor circuit_pick_create_handshake
...
Make the structure of circuit_pick_create_handshake consistent with
circuit_pick_extend_handshake.
No behaviour change.
2016-10-31 17:01:33 +11:00
teor
26d7a07ad7
In circuit_pick_extend_handshake, assume all hops support EXTEND2 and ntor
...
This simplifies the function: if we have an ntor key, use ntor/EXTEND2,
otherwise, use TAP/EXTEND.
Bugfix on commit 10aa913
from 19163 in 0.2.9.3-alpha.
2016-10-31 17:01:04 +11:00
Nick Mathewson
cac495f0ff
Merge branch 'bug20494'
2016-10-28 22:55:08 -04:00
Nick Mathewson
ada75d5567
Fix bad warning when checking IP policies.
...
I had replaced a comment implying that a set of ifs was meant to be
exhaustive with an actual check for exhaustiveness. It turns out,
they were exhaustive, but not in the way I had assumed. :(
Bug introduced in f3e158edf7
, not in any released Tor.
2016-10-28 15:33:12 -04:00
Matt Traudt
183fbc4137
Hopefully fix int64 comparisons in test_dir_networkstatus_compute_bw_weights_v10
2016-10-28 11:37:28 -04:00
Nick Mathewson
f3e158edf7
Comment the heck out of the stream/circuit attaching process.
2016-10-27 12:04:43 -04:00
David Goulet
70b9e79700
Slightly refactor and fix couple callsites
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-10-27 10:34:02 -04:00
Nick Mathewson
dc79504e2a
Document main.c a lot better
2016-10-27 10:25:26 -04:00
Ivan Markin
23b878b875
Do assert when calling relay_send_command_from_edge() on OR-side circs
2016-10-27 10:19:06 -04:00
Ivan Markin
2d04946960
Do not mark circs for close again after relay_send_command_from_edge()
2016-10-27 10:19:04 -04:00
Nick Mathewson
172b124006
Resolve memory leaks in test_dir_networkstatus_compute_bw_weights_v10
2016-10-27 09:41:19 -04:00
overcaffeinated
e2577cce0c
Convert remaining files to smartlist_add_strdup
...
The coccinelle script produced errors with these test files so
convert the remaining cases of smartlist_add to
smartlist_add_strdup by hand.
2016-10-27 11:15:57 +01:00
overcaffeinated
265d5446fa
Automated change to use smartlist_add_strdup
...
Use the following coccinelle script to change uses of
smartlist_add(sl, tor_strdup(str)) to
smartlist_add_strdup(sl, string) (coccinelle script from nickm
via bug 20048):
@@
expression a;
expression b;
@@
- smartlist_add
+ smartlist_add_strdup
(a,
- tor_strdup(
b
- )
)
2016-10-27 10:26:06 +01:00
overcaffeinated
b8b8b6b70e
Add implementation of smartlist_add_strdup
...
Add smartlist_add_strdup(sl, string) - replaces the use of
smartlist_add(sl, tor_strdup(string)). Fixes bug 20048.
2016-10-27 10:12:28 +01:00
Nick Mathewson
77d14b5f56
Small refactoring: explain G,M,E,D,T initialization
2016-10-26 16:39:59 -04:00
Matt Traudt
6629c5c3fe
Add historic bwweight tests, comments, line len fixes
2016-10-26 16:37:16 -04:00
Matt Traudt
7ba0ae9426
Add consensus weight calculation tests
2016-10-26 16:37:16 -04:00
Matt Traudt
909ee0e55f
Fix default bw weights with new consensus method
...
See #14881
2016-10-26 16:33:54 -04:00
Nick Mathewson
39375db3dc
Merge remote-tracking branch 'pastly/ticket20459'
2016-10-26 16:22:06 -04:00
Nick Mathewson
5a1779b7ff
Merge branch 'maint-0.2.9'
2016-10-26 14:17:21 -04:00
Nick Mathewson
d288704023
Avoid tor_fragile_assert() failure with DNSPort on RESOLVED_TYPE_ERROR
...
The tor_fragile_assert() bug has existed here since c8a5e2d588
in tor-0.2.1.7-alpha forever, but tor_fragile_assert() was mostly a
no-op until 0.2.9.1-alpha.
Fixes bug 19869.
2016-10-26 14:16:40 -04:00
Nick Mathewson
8a38d053a0
Continue the module documentation effort with circuitbuild and circuituse
2016-10-26 13:30:23 -04:00
Nick Mathewson
9c8dbcd0d6
More module documentation (circpathbias, circuitlist)
2016-10-26 12:38:50 -04:00
Nick Mathewson
206a9726b1
Regenerate trunnel code with trunnel 1.5
2016-10-26 11:06:45 -04:00
Nick Mathewson
a5f07a6c2a
More module-level documentation.
2016-10-26 11:02:57 -04:00
Nick Mathewson
04b8af9dc0
Whitespace fixes
2016-10-26 08:39:04 -04:00
Nick Mathewson
8cc528c750
Allow asking a bridge's own descriptor over one-hop connection
...
When we refactored purpose_needs_anonymity(), we made it so _all_
bridge requests required anonymity. But that missed the case
that we are allowed to ask a bridge for its own descriptor.
With this patch, we consider the resource, and allow "authority.z"
("your own descriptor, compressed") for a bridge's server descriptor
to be non-anonymous.
Fix for bug 20410; bug not in any released Tor.
2016-10-26 08:32:48 -04:00