Commit Graph

22432 Commits

Author SHA1 Message Date
Nick Mathewson
52ac539b99 Test a few more tortls.c functions 2018-09-04 14:52:35 -04:00
Nick Mathewson
7163389b55 Several unit tests to improve test coverage of x509*.c 2018-09-04 14:52:35 -04:00
Nick Mathewson
02086a216f Remove tor_x509_get_cert_impl as unneeded. 2018-09-04 14:52:35 -04:00
Nick Mathewson
b5fddbd241 Avoid double-close on TCP sockets under NSS. 2018-09-04 14:52:35 -04:00
Nick Mathewson
52d5f4da12 Avoid spurious error logs when using NSS
The tls_log_errors() function now behaves differently for NSS than
it did for OpenSSL, so we need to tweak it a bit.
2018-09-04 14:52:35 -04:00
Nick Mathewson
dd04fc35c6 Remove tor_tls_shutdown()
This function was supposed to implement a half-duplex mode for our
TLS connections.  However, nothing in Tor actually uses it (besides
some unit tests), and the implementation looks really questionable
to me.  It's probably best to remove it.  We can add a tested one
later if we need one in the future.
2018-09-04 14:52:35 -04:00
Nick Mathewson
5205c7fd90 Initial NSS support for TLS.
This is enough to get a chutney network to bootstrap, though a bunch
of work remains.
2018-09-04 14:52:35 -04:00
Nick Mathewson
fd994f55c4 Merge remote-tracking branch 'rl1987/doc26908' 2018-09-04 11:08:49 -04:00
Nick Mathewson
1e71e2c104 c99 style in loop 2018-09-04 11:04:55 -04:00
Nick Mathewson
3507fead10 Merge branch 'tor_api_owning_control' 2018-09-04 11:04:21 -04:00
Nick Mathewson
94b04d6c64 Merge branch 'bug24104_029_squashed' 2018-09-04 10:44:36 -04:00
cypherpunks
f8c0f694b7 app/config: reject non-UTF-8 ContactInfo
Closes ticket #27428.
2018-09-03 14:31:03 +00:00
cypherpunks
d32b08af6f string: add string_is_utf8() helper
Ticket #27373.
2018-09-03 13:54:43 +00:00
rl1987
ce4f73f8a3 Update sample torrc files to warn about not using BridgeRelay and MyFamily together 2018-09-02 21:11:52 +03:00
juga0
81f4223329 Test for descriptor does not change when hibernating 2018-09-01 18:47:20 -04:00
juga0
d4e51a2eeb Add missing router_tests to test.h 2018-09-01 18:47:20 -04:00
juga0
e033d98f79 Check descriptor bandwidth changed if not hibernating
There should be a separate check to update descriptor when start
or end hibernating.
2018-09-01 18:47:20 -04:00
juga0
1066fdd8d1 Add test for check_descriptor_bandwidth_changed 2018-09-01 18:47:20 -04:00
juga0
e13ddee166 Allow mocking rep_hist_bandwidth_assess 2018-09-01 18:47:20 -04:00
juga0
842b18ab26 Add test log helpers for msgs not containing str 2018-09-01 18:47:20 -04:00
juga0
6210d568ec Make bandwidth change factor a constant
used to determine large changes in bandwidth.
2018-09-01 18:47:20 -04:00
Neel Chauhan
1c62adb65b Change mention of is_extrainfo router_parse_list_from_string() to want_extrainfo 2018-08-29 21:05:24 -04:00
Nick Mathewson
94605f08fb Merge branch 'ticket27246_035_01_squashed' 2018-08-29 15:05:05 -04:00
Nick Mathewson
6c0c08bbb5 Expand the comments on ASN.1-encoded TAP keys 2018-08-29 15:04:54 -04:00
David Goulet
2f6bc74914 router: Keep RSA onion public key in ASN.1 format
The OpenSSL "RSA" object is currently 408 bytes compares to the ASN.1 encoding
which is 140 for a 1024 RSA key.

We save 268 bytes per descriptor (routerinfo_t) *and* microdescriptor
(microdesc_t). Scaling this to 6000 relays, and considering client usually
only have microdescriptors, we save 1.608 MB of RAM which is considerable for
mobile client.

This commit makes it that we keep the RSA onion public key (used for TAP
handshake) in ASN.1 format instead of an OpenSSL RSA object.

Changes is done in both routerinfo_t and microdesc_t.

Closes #27246

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-08-29 15:01:38 -04:00
Mike Perry
7685c39f9d Add half_edge_t to noinst_HEADERS. 2018-08-29 18:46:01 +00:00
Mike Perry
93ff8b411a Merge branch 'ticket25573-034' into ticket25573-master 2018-08-29 17:10:06 +00:00
Mike Perry
ce894e20b5 Ticket #25573: Count TRUNCATED cells.
TRUNCATED cells were ignored while in path bias. Now they are obeyed, and
cause us to tear down the circuit. The actual impact is minimal, since we
would just wait around for a probe that would never arrive before.

This commit changes client behavior.
2018-08-29 04:12:15 +00:00
Mike Perry
144647031a Ticket #25573: Check half-opened stream ids when choosing a new one
Avoid data corrupton by avoiding mixing up old stream ids with new ones.

This commit changes client behavior.
2018-08-29 04:12:15 +00:00
Mike Perry
c56f63eadb Ticket #25573: Track half-closed stream ids
We allow their CONNECTEDs, RESOLVEDs, ENDs, SENDMEs, and DATA cells to not
count as dropped until the windows are empty, or we get an END.

This commit does not change behavior. It only changes CIRC_BW event field
values.
2018-08-29 04:12:09 +00:00
Nick Mathewson
3d7a705d3a Merge remote-tracking branch 'onionk/prototest1' 2018-08-28 21:32:46 -04:00
Mike Perry
dac7d92918 Mark smartlist_bsearch as taking a const list.
It does not modify the actual list.
2018-08-29 00:03:41 +00:00
Roger Dingledine
6da8c6e9a5 make a comment more right
(from #20874 fix)
2018-08-28 16:13:58 -04:00
Nick Mathewson
b26db5dddb Merge remote-tracking branch 'onionk/connection-comments1' 2018-08-28 16:07:46 -04:00
Nick Mathewson
48632455a5 Merge branch 'bug26367_035_01' 2018-08-28 16:02:04 -04:00
David Goulet
8f13c3d3ed hs: Remove rend_client_non_anonymous_mode_enabled
The removal of Tor2Web made this function useless.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-08-28 16:01:57 -04:00
David Goulet
f661d856fd hs: Remove rend_client_allow_non_anonymous_connection
By removing Tor2Web, there is no way a client can be non anonymous so we
remove that function and the callsites.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-08-28 16:01:57 -04:00
David Goulet
67cd67611c circ: Remove useless param from cannibalization function
Because we just removed Tor2web support, the need_specific_rp is not needed
anymore when cannibalizing a circuit.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-08-28 16:01:57 -04:00
David Goulet
4976eca826 hs: Render obsolete Tor2web
Remove support for Tor2web in the code and build system. At this commit, tor
doesn't have Tor2web support anymore.

Ref: https://lists.torproject.org/pipermail/tor-dev/2018-July/013295.html

Close #26367

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-08-28 16:01:57 -04:00
Nick Mathewson
219f6ea516 Fix log.c comments about assert vs tor_assert vs raw_assert. 2018-08-28 15:58:16 -04:00
Nick Mathewson
2bc4c55d7d Merge remote-tracking branch 'tor-github/pr/245' 2018-08-28 15:44:06 -04:00
Nick Mathewson
3b960df4f9 Merge branch 'bug26896_034' 2018-08-28 12:35:50 -04:00
rl1987
3890ad2578 Stricter HiddenServicePort parsing 2018-08-28 18:32:31 +03:00
David Goulet
d9bfc9e2e3 fixup! hs: Learn service version by trying to load the keys 2018-08-28 08:36:28 -04:00
Nick Mathewson
64c3c6a790 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-08-27 09:39:08 -04:00
Nick Mathewson
0483f7f64c Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-27 09:39:08 -04:00
Nick Mathewson
103dd68ba8 Merge branch 'maint-0.3.4' 2018-08-27 09:39:08 -04:00
teor
70a07fa90b
When running make test-network-all, use the mixed+hs-v2 network
No behaviour change.

A previous fix to chutney removed v3 onion services from the
mixed+hs-v23 network, so seeing "mixed+hs-v23" in tests is
confusing.

Fixes bug 27345; bugfix on 0.3.2.1-alpha.
2018-08-27 23:07:20 +10:00
cypherpunks
0cd72a2833 core/mainloop: more comments documenting connection.c 2018-08-27 01:32:34 +00:00
cypherpunks
309961138b core/mainloop: fix documentation of connection_handle_write_impl()
Inaccurate since ​d9746bd468f551d1ada57d962b20eddd15256ce9.
2018-08-27 01:07:01 +00:00
Nick Mathewson
4c1c818ffa Update to 0.3.4.7-rc-dev 2018-08-24 16:49:56 -04:00
Nick Mathewson
bb65b53966 Fix a compilation warning on i386 with clang 2018-08-24 16:13:30 -04:00
Nick Mathewson
7217bdacb5 Merge remote-tracking branch 'tor-github/pr/289' 2018-08-24 12:57:18 -04:00
Nick Mathewson
622231ce2e Merge remote-tracking branch 'teor/bug27237' 2018-08-24 12:44:46 -04:00
Nick Mathewson
b1d0fa04fb Merge branch 'maint-0.3.4' 2018-08-24 12:35:26 -04:00
Nick Mathewson
658171318f Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-24 12:35:23 -04:00
Nick Mathewson
33e4e30d0a Merge branch 'maint-0.3.2' into maint-0.3.3 2018-08-24 12:32:10 -04:00
Nick Mathewson
98e1a1d106 Merge branch 'ticket27286_032_v2' into maint-0.3.2 2018-08-24 12:32:06 -04:00
Nick Mathewson
14be9cba4e Update the protocol versions recommendations to remove LinkAuth=1
LinkAuth method 1 is the one where we pull the TLS master secrets
out of the OpenSSL data structures and authenticate them with
RSA. Right now we list method 1 as required for clients and relays.
That's a problem, since we can't reasonably support it with NSS. So
let's remove it as a requirement and a recommendation.

As for method 3: I'd like to recommend it it, but that would make
0.2.9 start warning.  Let's not do that till at least some time
after 0.3.5 (the next LTS) is stable.

Closes ticket 27286
2018-08-24 12:31:01 -04:00
Nick Mathewson
08a1619e7f Merge branch 'maint-0.3.4' 2018-08-24 12:05:39 -04:00
teor
dd27e17ccc Bootstrap: add some extra logging
Diagnostics for 27236.
2018-08-24 12:05:36 -04:00
teor
3ebbc1c84d Bootstrap: allow internal-only onion service networks to bootstrap
This fix requires chutney's 27230 fix to bridge client bootstrap.

Part of 27236.
2018-08-24 12:05:29 -04:00
Nick Mathewson
4748fd23da Bump to 0.3.4.7-rc 2018-08-24 09:13:20 -04:00
Nick Mathewson
f36b3faa75 Merge branch 'maint-0.3.4' 2018-08-24 08:32:33 -04:00
teor
7a5896d5d4
Bootstrap: try harder to get descriptors in non-exit test networks
Use the mid weight for the third hop when there are no exits.

Fixes bug 27237; bugfix on 0.2.6.2-alpha.
2018-08-24 12:49:05 +10:00
teor
588c77677a
Bootstrap: stop requiring descriptors to count exits as usable
Instead, count exits as usable if they have the exit flag, and
present if they also have a non-reject exit policy.

Requiring a threshold of usable descriptors avoids directories trickling
exit descriptors to clients to discover their ExitNodes settings.

Part of 27236.
2018-08-24 12:08:11 +10:00
Nick Mathewson
d50f90bfc4 Merge branch 'maint-0.3.4' 2018-08-23 19:37:32 -04:00
Nick Mathewson
e01ea64f0a Merge branch 'maint-0.3.2' into maint-0.3.3 2018-08-23 19:36:45 -04:00
Nick Mathewson
36bb11a650 Merge branch 'maint-0.2.9' into maint-0.3.2 2018-08-23 19:36:45 -04:00
Nick Mathewson
6e0872e867 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-23 19:36:45 -04:00
teor
cc4ea34a26
Silence a compilation warning on MSVC 2017 and clang-cl
test.c no longer uses lround(), so we don't need to declare it,
and we can use math.h for fabs().

Fixes bug 27185; bugfix on 0.2.2.2-alpha.
2018-08-24 09:15:04 +10:00
Nick Mathewson
2ae92ab973 Merge branch 'maint-0.3.4' 2018-08-23 14:26:04 -04:00
teor
fadcab920b
Bootstrap: check the exit policy and flag on descriptors
Previously, Tor would only check the exit flag. In small networks, Tor
could bootstrap once it received a consensus with exits, without fetching
the new descriptors for those exits.

After bootstrap, Tor delays descriptor fetches, leading to failures in
fast networks like chutney.

Fixes 27236; bugfix on 0.2.6.3-alpha.
2018-08-24 01:13:53 +10:00
teor
692efdad09
Update the message logged on relays when DirCache is disabled
Since 0.3.3.5-rc, authorities require DirCache (V2Dir) for the Guard
flag.

Fixes bug 24312; bugfix on 0.3.3.5-rc.
2018-08-23 19:13:25 +10:00
Dominique Ingoglia
8747afc5e0
Change the wording of the DirCache warning 2018-08-23 19:13:15 +10:00
Nick Mathewson
c567b8fcb4 NSS support for x509 certs
7 unit tests are failing at this point, but they're all TLS-related.
2018-08-22 16:11:45 -04:00
Nick Mathewson
7c5339677f Log error strings in crypto_nss_log_errors().
I'll need this for debugging.
2018-08-22 12:36:25 -04:00
David Goulet
e8557ba00d hs: Change default version from 2 to 3
Closes #27215

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-08-22 11:42:23 -04:00
David Goulet
61ad81c36e hs: Learn service version by trying to load the keys
In order to switch the default HS version from 2 to 3, we need tor to be smart
and be able to decide on the version by trying to load the service keys during
configuration validation.

Part of #27215

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-08-22 11:38:28 -04:00
David Goulet
cb466ee7d6 key: Make ed_key_init_from_file() take an or_options_t
Part of #27215, we need to call the ed_key_init_from_file function during
option_validate() which is before the global_options variable is set.

This commit make ed_key_init_from_file() stop using get_options() and instead
now has a or_options_t parameter.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-08-22 11:32:57 -04:00
George Kadianakis
5febea0d54 Fix revision counter bugs caused by bad SRV start time computation.
Bug description: For each descriptor, its revision counter is the OPE
ciphertext of the number of seconds since the start time of its SRV value.
This bug caused us to confuse the SRV start time in the middle of the lifetime
of a descriptor in some edge-cases, which caused descriptor rejects.

Bug cause: The bug occurs when we fetch a 23:00 consensus after
midnight (e.g. at 00:08 when not all dirauths have fetched the latest 00:00
consensus). In that case, the voting schedule (which was used for SRV start
time calculation) would return a valid-after past-midnight, whereas our
consensus would be pre-midnight, and that would confuse the SRV start time
computation which is used by HS revision counters (because we would reset the
start time of SRV, without rotating descriptors).

Bug fix: We now use our local consensus time to calculate the SRV start time,
instead of the voting schedule. The voting schedule does not work as originally
envisioned in this case, because it was created for voting by dirauths and not
for scheduling stuff on clients.
2018-08-22 18:09:47 +03:00
Nick Mathewson
8148c0717d Change log_test_helpers macros to use printf, not pasting
This ensures that our test failure messages actually tell us what
strings Tor was expecting.  I will need this to debug some test
failures.
2018-08-22 10:55:55 -04:00
Nick Mathewson
c1ad40627b Merge branch 'maint-0.2.9' into maint-0.3.2 2018-08-22 09:37:31 -04:00
Nick Mathewson
8691046ac6 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-08-22 09:37:31 -04:00
Nick Mathewson
573b6e4f2f Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-22 09:37:31 -04:00
Nick Mathewson
9068e2fa28 Mark cert_matches_key as not-intrusive; fix stretch compilation. 2018-08-22 09:37:26 -04:00
Nick Mathewson
e619fd02ef Merge remote-tracking branch 'tor-github/pr/287' 2018-08-21 20:08:55 -04:00
Nick Mathewson
bf5704051c Merge remote-tracking branch 'teor/travis-osx-master' 2018-08-21 20:04:13 -04:00
Nick Mathewson
aac1e17f22 Merge remote-tracking branch 'teor/travis-osx-034' into maint-0.3.4 2018-08-21 20:04:03 -04:00
Nick Mathewson
f0633bc491 Merge remote-tracking branch 'teor/travis-osx-033' into maint-0.3.3 2018-08-21 20:03:56 -04:00
Nick Mathewson
a29e9a901d Merge remote-tracking branch 'teor/travis-osx-032' into maint-0.3.2 2018-08-21 20:03:41 -04:00
Neel Chauhan
3bf4493cb9 Remove duplicate include in src/test/test_address.c 2018-08-21 20:01:48 -04:00
Nick Mathewson
de66bd397c Merge branch 'maint-0.3.4' 2018-08-21 19:20:37 -04:00
Nick Mathewson
f68aab83ba Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-21 19:20:31 -04:00
Nick Mathewson
245025a3df Merge branch 'maint-0.3.2' into maint-0.3.3 2018-08-21 19:16:40 -04:00
Nick Mathewson
d52f406001 Merge branch 'maint-0.2.9' into maint-0.3.2 2018-08-21 19:16:40 -04:00
Nick Mathewson
5245a296c5 Make some x509 functions generic; remove some fields NSS doesn't need 2018-08-21 12:25:33 -04:00
Nick Mathewson
b9ca8f2356 Extract internal-only parts of x509.h 2018-08-21 12:25:33 -04:00
Nick Mathewson
108d9879eb Extract the non-generic part of tor_tls_context_decref(). 2018-08-21 12:25:33 -04:00
Nick Mathewson
96f8e19802 Implement PBKDF2 with NSS.
This was a gap that we left in the last commit.
2018-08-21 12:25:33 -04:00
Nick Mathewson
6a88d8f6b4 When enabling NSS, disable OpenSSL.
We used to link both libraries at once, but now that I'm working on
TLS, there's nothing left to keep OpenSSL around for when NSS is
enabled.

Note that this patch causes a couple of places that still assumed
OpenSSL to be disabled when NSS is enabled
   - tor-gencert
   - pbkdf2
2018-08-21 12:25:33 -04:00
Nick Mathewson
1992c76130 Split tls modules and their tests into openssl and generic.
Also, add a stubbed-out nss version of the modules.  The tests won't
pass with NSS yet since the NSS modules don't do anything.

This is a good patch to read with --color-moved.
2018-08-21 12:25:33 -04:00
Nick Mathewson
91c1e88b7a Refactor some of the certificate-manipulation logic 2018-08-21 12:25:33 -04:00
Nick Mathewson
598bc78bfa Extract tortls structures into a new header; clean up a little 2018-08-21 12:25:33 -04:00
Nick Mathewson
9a4f05b05c Split X509 code out of tortls.c 2018-08-21 12:25:33 -04:00
Nick Mathewson
3ccb94d7b6 The RSA_free in this test is no longer needed or wanted 2018-08-21 12:24:08 -04:00
Nick Mathewson
aa45511250 Implement RSA for NSS. 2018-08-21 12:24:08 -04:00
Nick Mathewson
cb5cfe3177 Also reinitialize the pregenerated keys postfork. 2018-08-21 12:24:08 -04:00
Nick Mathewson
b94e7de7db Refactor crypto_rsa to use pem module.
This cleans up a lot of junk from crypto_rsa_openssl, and will
save us duplicated code in crypto_rsa_nss (when it exists).

(Actually, it already exists, but I am going to use git rebase so
that this commit precedes the creation of crypto_rsa_nss.)
2018-08-21 12:24:08 -04:00
Nick Mathewson
9566ed6fd9 Add rudimentary support for PEM-encoding, since NSS doesn't do that. 2018-08-21 12:24:08 -04:00
Nick Mathewson
0812f1cbc2 Use a constant for "65537" 2018-08-21 12:24:08 -04:00
Nick Mathewson
824009cde5 Rename openssl-bridging functions in crypto_rsa
These functions exist only to expose RSA keys to other places in Tor
that use OpenSSL; let's be specific about their purpose.
2018-08-21 12:24:08 -04:00
Nick Mathewson
38212d2e40 Remove a redundant function. 2018-08-21 12:24:08 -04:00
Nick Mathewson
0f971d7c91 Rename functions that encode/decode private keys
It is not nice to expose a private key's contents without having the
function name advertise the fact.  Fortunately, we weren't misusing
these yet.
2018-08-21 12:24:08 -04:00
Nick Mathewson
752ffa2197 Extract openssl RSA functionality into its own file. 2018-08-21 12:24:08 -04:00
Nick Mathewson
9bb0ac4bf1 Merge branch 'coverage_6aug_squashed' 2018-08-21 12:14:51 -04:00
Nick Mathewson
fe00a481fc Add a unit test for tor_log_mallinfo() 2018-08-21 12:14:41 -04:00
Nick Mathewson
f124037cde Add unit tests for parsing "extended" format of config lines. 2018-08-21 12:14:41 -04:00
Nick Mathewson
21a9d03445 fixup! Check for duplicate-close in connection_dir_finished_flusing() 2018-08-21 11:15:07 -04:00
Nick Mathewson
ff0be08059 Fix a bug warning when sending an error on an HTTPTunnelPort conn
Fixes bug 26470; bugfix on 0.3.2.1-alpha.
2018-08-21 10:12:04 -04:00
Nick Mathewson
18183de060 Check for duplicate-close in connection_dir_finished_flusing()
Fix for 26896.
2018-08-21 09:50:48 -04:00
Neel Chauhan
eb2b130ad9 If ExitRelay is not specified, emulate the behavior of "ExitRelay 0" 2018-08-20 20:25:23 -04:00
Nick Mathewson
85a8792344 Rewrite test_tortls_cert_matches_key()
Unlike the old test, this test no will no longer mess around with
the forbidden internals of any openssl data structures.

Additionally, it verifies several other behaviors of
tor_tls_cert_matches_key() that we had wanted to verify, such as
the possibility of the certificate's key not matching.

Fixes bug 27226; bugfix on 0.2.5.1-alpha.
2018-08-20 17:43:41 -04:00
Nick Mathewson
c1f476a3d5 Use our x509 wrapper code in tor_tls_cert_matches_key()
This allows us to mock our own tor_tls_get_peer_certificate()
function in order to test ..cert_matches_key(), which will in turn
allow us to simplify test_tortls_cert_matches_key() considerably.

Prep work for the fix for 27226.
2018-08-20 17:42:38 -04:00
Neel Chauhan
aab6aea197 Fix typo in comment for getinfo_helper_current_time() 2018-08-20 11:49:35 -04:00
rl1987
5ab2110eb6 Rework predicted_ports_prediction_time_remaining() to fix CID 1438153 2018-08-19 21:03:01 +03:00
cypherpunks
6c0e7a9e1a test/protover: add double-voting test 2018-08-19 02:21:46 +00:00
rl1987
ed0ee340d4 Refactoring: Move code that creates listener for port into new function 2018-08-18 11:26:38 +03:00
cypherpunks
18416b2cf0 test/protover: add test for whitespace parsing bug 2018-08-17 17:25:24 +00:00
cypherpunks
4f3e6d5027 test/protover: add test for hyphen parsing bug 2018-08-17 17:21:46 +00:00
Nick Mathewson
700f5bcc43 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-17 09:38:26 -04:00
Nick Mathewson
e0b8c53f56 Merge branch 'maint-0.3.4' 2018-08-17 09:38:26 -04:00
Nick Mathewson
87aacbfbba Merge remote-tracking branch 'onionk/rust-protospace' into maint-0.3.3 2018-08-17 09:38:08 -04:00
cypherpunks
7b7dd9ae1c rust/protover: don't accept whitespace in ProtoSet::from_str()
It's impossible for spaces to get here, since spaces are used as
separators between individual protocol entries higher up.

And it shouldn't ignore whitespace that isn't a literal space
character, because that would differ from the C implementation.

These were added in 9925d2e687.

Fixes #27177. Bugfix on 0.3.3.5-rc.
2018-08-17 13:34:03 +00:00
Nick Mathewson
ac721bd3b4 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-17 09:29:46 -04:00
Nick Mathewson
bedc0b0b8f Merge branch 'maint-0.3.4' 2018-08-17 09:29:46 -04:00
cypherpunks
cc93f175ed rust/protover: fix hyphen parsing bug in ProtoSet::from_str()
It was parsing "1-2-3" as if it were 1-2, ignoring the 2nd hyphen
and everything after.

Introduced in d1820c1516.

Fixes #27164; bugfix on 0.3.3.1-alpha.
2018-08-17 13:27:24 +00:00
Nick Mathewson
042aed3f1d Merge remote-tracking branch 'onionk/rust-docs1' 2018-08-17 09:07:06 -04:00
Unto Sten
ba3c785092 Inform users about configuration file and directory includes
This patch makes it clearer to users what settings Tor daemon
is actually using. I think it is pretty important.
2018-08-17 14:08:59 +03:00
Neel Chauhan
64d9ea1413
In addrs_in_same_network_family(), choose IP subnet size based on IP type 2018-08-17 13:37:51 +10:00
cypherpunks
fc7fed6155 rust/protover: fix docs for UnvalidatedProtoEntry::from_str
This got shuffled around in b786b146ed
and hasn't been accurate since 124caf28e6.
2018-08-17 02:38:23 +00:00
cypherpunks
e65a4fa42c rust/protover: fix parsing docs
The function takes an already validated utf-8 string, and
it never checks if the version numbers are an empty string.
That parse error happens later.

Fix on 701c2b69f5
2018-08-17 02:38:23 +00:00
cypherpunks
7bb658a633 rust/protover: fix ProtoEntry::from_str docs
Texxt was copied from a function that returned a single
tuple in 88b2f170e4.
2018-08-17 02:38:23 +00:00
Nick Mathewson
c8aecd14fe Merge branch 'pr275_squashed' 2018-08-16 08:43:05 -04:00
cypherpunks
6b609ce435 rust: run rustfmt 2018-08-16 08:42:57 -04:00
cypherpunks
ceac10fc3d rust: max_width=100, other rustfmt settings. #27071
These are the 12 stable and documented configuration options,
set to their default values.

use_small_heuristics is only stabilized in rustfmt 0.9, so maintain
support for 0.8.x for now by commenting it out.

comment_width is unstable and did nothing, since wrap_comments defaults
to false.

Default values gotten from `rustfmt --print-config default rustfmt.toml`.

e7932fa9c2/Configurations.md
2018-08-16 08:42:57 -04:00
cypherpunks
fef2ba2267 rust/docs: fix critical typo for missing_docs lint
Fix typo from fe66d06a45.
The exclamation point is what lets an attribute apply to
an entire crate, without the ! it's practically a placebo.

Fix on commits af182d4ab5 and
b6059297d7, and note there are
still missing docs in both crypto and protover, for now.

https://doc.rust-lang.org/reference/attributes.html
2018-08-16 08:42:57 -04:00
Nick Mathewson
936e2aa0de Merge branch 'maint-0.3.2' into maint-0.3.3 2018-08-16 08:37:11 -04:00
Nick Mathewson
b49355915b Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-16 08:37:11 -04:00
Nick Mathewson
7e50d43f07 Merge branch 'maint-0.3.4' 2018-08-16 08:37:11 -04:00
George Kadianakis
c798957b59 Keep descriptor rotation time after HUP occurs. 2018-08-16 08:36:48 -04:00
Nick Mathewson
d029a5162d Merge branch 'ticket27096' 2018-08-16 08:32:06 -04:00
rl1987
fb137b30fc Exclude setenv/unsetenv code on Windows 2018-08-16 08:31:45 -04:00
rl1987
f454c28303 Fix test to pass without HOME env being set 2018-08-16 08:31:45 -04:00
Nick Mathewson
6c1d2549df Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-15 02:16:23 -04:00
Nick Mathewson
1868982de6 Merge remote-tracking branch 'public/bug26779_033' into maint-0.3.3 2018-08-15 02:16:19 -04:00
Nick Mathewson
b329cdf768 Merge remote-tracking branch 'public/bug26779_035' 2018-08-15 02:14:17 -04:00
Nick Mathewson
e56f0c9d33 Adjust windows stubs for new start/finish_daemon() return types 2018-08-14 16:44:59 -04:00
Neel Chauhan
f282375fb7 Add regression test for Bug #20874 2018-08-11 18:09:01 -04:00
Nick Mathewson
c775689e96 Merge remote-tracking branch 'tor-github/pr/244' 2018-08-11 10:05:15 -04:00
Nick Mathewson
61d5bcc1a2 Merge remote-tracking branch 'tor-github/pr/268' 2018-08-11 10:04:04 -04:00
Nick Mathewson
b7ed61167f Merge remote-tracking branch 'tor-github/pr/239' 2018-08-10 12:35:06 -04:00
teor
546c134801
Rust: Use --all-features in test_rust.sh for 0.3.3 and 0.3.4
Re-applies 0.3.3 changes after 24629.
2018-08-10 16:37:19 +10:00
teor
19038ff4bb
Revert "Rust: Use --all-features in test_rust.sh for 0.3.3 and 0.3.4"
This reverts commit e1291aa84a.
2018-08-10 13:30:16 +10:00
teor
ace98493bd
Merge branch 'travis-osx-034' into travis-osx-master
Replace master .travis.yml with 034 .travis.yml.
All the changes in master have been backported to the
034 .travis.yml already.

Replace master src/test/test_rust.sh with 034
src/test/test_rust.sh, which was backported from
master. One 033/034-specific commit needs to be
reverted.
2018-08-10 13:28:19 +10:00
teor
6e0be81211
Merge branch 'travis-osx-033' into travis-osx-034
Replace 034 .travis.yml with 033 .travis.yml.
Subsequent commits will restore 034 functionality.

Replace 034 src/test/test_rust.sh with 033
src/test/test_rust.sh, which was backported from
master.
2018-08-10 13:15:16 +10:00
teor
e1291aa84a
Rust: Use --all-features in test_rust.sh for 0.3.3 and 0.3.4
Re-applies 0.3.3 changes after 24629.
2018-08-10 13:11:27 +10:00
teor
229a75a49a
Rust: use a consistent working directory in builds and tests
cd to ${abs_top_builddir}/src/rust before running cargo in
src/test/test_rust.sh.

Fixes bug 26497; bugfix on 0.3.3.2-alpha.
2018-08-10 11:54:26 +10:00
teor
0f3fd10ee0
Stop setting $CARGO_HOME in src/rust/tor_rust/include.am
cargo will use the user's $CARGO_HOME, or $HOME/.cargo by default.

Fixes bug 26497; bugfix on 0.3.1.5-alpha.
2018-08-10 11:47:36 +10:00
teor
2b9dd0f9c0
Merge branch 'travis-osx-032' into travis-osx-033
Replace 033 .travis.yml with 032 .travis.yml.
Subsequent commits will restore 033 functionality.

src/rust/tor_util/include.am is deleted in 033.
Subsequent commits will apply 032 changes to
src/rust/tor_rust/include.am.

Replace 033 src/test/test_rust.sh with 032
src/test/test_rust.sh, which was backported from
master.
2018-08-10 11:43:17 +10:00
teor
c9ad16ca2a
Fix $abs_top_srcdir in test_rust.sh
Consistently use ../../.. as a fallback for $abs_top_srcdir in
test_rust.sh.

Fixes bug 27093; bugfix on 0.3.4.3-alpha.
2018-08-10 11:22:36 +10:00
teor
ce19477ffc
Stop setting $CARGO_HOME
cargo will use the user's $CARGO_HOME, or $HOME/.cargo by default.

Fixes bug 26497; bugfix on 0.3.1.5-alpha.
2018-08-10 11:14:32 +10:00
teor
2a35b085ee
Rust: backport src/test/test_rust.sh from master
Preparation for 26497.
2018-08-10 11:09:18 +10:00
Nick Mathewson
5980cb8a19 Merge branch 'maint-0.3.4' 2018-08-09 08:47:26 -04:00
Nick Mathewson
b4362b99cf Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-09 08:47:25 -04:00
Nick Mathewson
fde551a387 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-08-09 08:47:25 -04:00
Nick Mathewson
8982719f6a Merge branch 'maint-0.2.9' into maint-0.3.2 2018-08-09 08:47:24 -04:00
Karsten Loesing
fe19b40fe9 Update geoip and geoip6 to the August 7 2018 database. 2018-08-09 09:44:38 +02:00
Neel Chauhan
a207511bb0 In cell_queues_check_size(), add DNS cache size to total memory allocation 2018-08-08 20:52:57 -04:00
Nick Mathewson
df444e482b Provide examples of tor_api_get_provider_version() output
At the same time, sternly warn any person thinking about relying on
any particular format too strictly.  If you do this, and your
program breaks, it is your bug, not mine.
2018-08-08 18:10:28 -04:00
Nick Mathewson
159141a8c6 Merge branch 'ticket26947' 2018-08-08 18:07:32 -04:00
Nick Mathewson
0f0dac0bfc Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-08 18:06:15 -04:00
Nick Mathewson
da4f4cb269 Merge branch 'maint-0.3.4' 2018-08-08 18:06:15 -04:00
Nick Mathewson
c4d0d9bd24 Merge branch 'bug26948_033' into maint-0.3.3 2018-08-08 18:06:11 -04:00
Nick Mathewson
a57c27a1c7 Call crypto_postfork on start_daemon() instead. 2018-08-08 17:32:26 -04:00
Nick Mathewson
622a2c6bee Make finish_daemon() return a boolean to say whether it did anything. 2018-08-08 16:59:53 -04:00
Nick Mathewson
4f300d547d When RunAsDaemon is set, crypto_postfork() as needed 2018-08-08 16:50:23 -04:00
Nick Mathewson
26f1167e71 Merge branch 'bug26779_033' into bug26779_035 2018-08-08 15:50:29 -04:00
Nick Mathewson
b66386865e Detect broken stdatomic.h, and pretend that it isn't there at all
I hope that the debian clang maintainers will look at debian bug
903709 soon. But until they do, this should keep our users and our
CI happy on sid with clang.

Closes ticket 26779.
2018-08-08 15:49:39 -04:00
rl1987
7a1007861f Print stacktrace when crypto_pk_get_digest() fails in router_build_fresh_descriptor() 2018-08-08 18:56:27 +03:00
rl1987
9c242e950b Consider all routerinfo errors other than "not a server" transient 2018-08-08 18:47:43 +03:00
Nick Mathewson
aaa5ca366e Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-08 09:26:23 -04:00
Nick Mathewson
7787150521 Merge branch 'maint-0.3.4' 2018-08-08 09:26:23 -04:00
Nick Mathewson
00536254b7 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-08-08 09:26:23 -04:00
Nick Mathewson
8e68fe7e1c Merge branch 'maint-0.2.9' into maint-0.3.2 2018-08-08 09:26:22 -04:00
Daniel Pinto
a350f216b3 Fix crash when calling openat with sandbox enabled #25440
The seccomp rule for the openat syscall checks for the AT_FDCWD
constant. Because this constant is usually a negative value, a
cast to unsigned int is necessary to make sure it does not get
converted to uint64_t used by seccomp.

More info on:
https://github.com/seccomp/libseccomp/issues/69#issuecomment-273805980
2018-08-08 09:21:29 -04:00
Neel Chauhan
3a2b5a5bcb Fix typo in control_event_hs_descriptor_content() 2018-08-08 00:12:00 -04:00
Nick Mathewson
de129e69ba Update version to 0.3.4.6-rc-dev 2018-08-07 20:15:34 -04:00
Nick Mathewson
5e86a28683 Merge branch 'maint-0.3.4' 2018-08-07 08:05:56 -04:00
Nick Mathewson
882b2ad0aa Merge branch 'bug27003_034_v2' into maint-0.3.4 2018-08-07 08:05:51 -04:00
Nick Mathewson
f6763a8218 Add tests for the failing case of tor_localtime_r 2018-08-06 16:44:26 -04:00
Nick Mathewson
abf88af488 Merge branch 'maint-0.3.4' 2018-08-06 10:39:59 -04:00
Nick Mathewson
a54e94878a Rename SEC identifier to BW_SEC in test_bwmgt.h
Apparently Solaris 10 defines SEC somewhere in its headers, causing
a compilation problem.

Fixes bug 26994; bugfix on 0.3.4.1-alpha.
2018-08-06 10:39:14 -04:00
Nick Mathewson
a8bab72c37 Bump to 0.3.4.6-rc 2018-08-06 08:28:56 -04:00
Nick Mathewson
622a057e7e Merge remote-tracking branch 'public/string_coverage' 2018-08-03 07:03:29 -04:00
Nick Mathewson
176999fd95 When enabling periodic events, schedule but don't run them immediately.
When we fixed 25939 in f7633c1fca, we
introduced a call to rescan_periodic_events() from inside the onion
service logic. But this meant that we could rescan the event list --
thereby running event callbacks! -- from inside the hidden service code.
This could cause us to run some of our event callbacks from an
inconsistent state, if we were in the middle of changing options.

A related bug (#25761) prevented us from rescanning our periodic
events as appropriate, but when we fixed THAT one, this bug reared
its ugly head.

The fix here is that "enabling" an event should cause us to run it
from the event loop, but not immediately from the point where we
enable it.

Fixes bug 27003; bugfix on 0.3.4.1-alpha.
2018-08-02 10:14:56 -04:00
Nick Mathewson
f83b417bf8 Suppress strict-prototypes warning in crypto_nss_mgt.c 2018-08-02 08:41:33 -04:00
Nick Mathewson
727f1676d6 Fix double-link of crypto_openssl_mgt.c 2018-08-02 08:38:59 -04:00
Nick Mathewson
b590cc0449 Add a cast to make clang happier. 2018-08-02 08:36:24 -04:00
Nick Mathewson
861d690018 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-08-01 14:37:07 -04:00
Nick Mathewson
af97879446 Merge branch 'maint-0.3.4' 2018-08-01 14:37:07 -04:00
Nick Mathewson
eb604f5faa Fix build on GNU/Hurd. Patch from paulusASol. Closes 26873. 2018-08-01 14:37:03 -04:00
Nick Mathewson
fe3bacf50a Convert __OwningControllerFD to a 64-bit value
This lets us potentially use it for internal passing of windows
sockets.
2018-08-01 11:01:52 -04:00
Nick Mathewson
c77fe82155 Add API for creating an owning controller FD and passing it to tor_main 2018-08-01 11:01:52 -04:00
Nick Mathewson
9a89450b6d tor_api: Extend tor_api code so it can pass extra arguments to main.
We need this so that the tor_api user can specify some arguments,
while the tor_api implementation adds others.

This implementation detail should not be visible to tor_api users.
2018-08-01 11:01:52 -04:00
Nick Mathewson
ff7229b32c Document new helper functions in socketpair.c 2018-08-01 11:01:52 -04:00
Nick Mathewson
1b7b9c7e63 Reindent tor_ersatz_socketpair 2018-08-01 11:01:52 -04:00
Nick Mathewson
fc0dc5aa9e Refactor tor_ersatz_socketpair() not to need socket.
This change also makes tor_ersatz_socketpair() follow the same
interface as socketpair() rather than tor_socketpair(), so it now
needs to be wrapped in the same code as socketpair() does.
2018-08-01 11:01:52 -04:00
Nick Mathewson
9b24609af0 Remove dependency from socketpair.c on address.h
Also refactor some annoying code in tor_ersatz_socketpair.
2018-08-01 09:24:22 -04:00
Nick Mathewson
2884639ad6 Extract tor_ersatz_socketpair into a new c file
I'm doing this because I want to make it a lower-level function
again, so that we can use it without linking in the rest of the
universe.
2018-08-01 08:47:27 -04:00
Nick Mathewson
a4c0a0e81e Fix issues with crypto_ope compilation now that crypto.h is gone 2018-07-31 19:56:42 -04:00
Nick Mathewson
fdaa483098 Merge branch 'nss_dh_squashed' into nss_dh_squashed_merged 2018-07-31 19:56:23 -04:00
Nick Mathewson
17f922d371 Only link crypto_dh_openssl.c once
(We do this unconditionally, since we still need it for tortls.c)
2018-07-31 19:46:00 -04:00
Nick Mathewson
f5e22358b0 Additional tests for NSS DH
Notably, there's a test to make sure that it round-trips with
OpenSSL, if OpenSSL is enabled.
2018-07-31 19:46:00 -04:00
Nick Mathewson
17ea931ac7 Implement DH in NSS. 2018-07-31 19:46:00 -04:00
Nick Mathewson
32bbc8f6b5 Refactor the dependency between tortls and crypto_dh.
We only ever need this to get us a DH ephemeral key object,
so make a function that does just that.
2018-07-31 19:46:00 -04:00
Nick Mathewson
ac9a470c64 Extract the shared part of crypto_dh_compute_secret. 2018-07-31 19:46:00 -04:00
Nick Mathewson
60a5b78480 Extract the OpenSSL DH functionality to a new file. 2018-07-31 19:46:00 -04:00
Nick Mathewson
99beed152e Make the rust tests link. 2018-07-31 19:46:00 -04:00
Nick Mathewson
2d80673b9a Fix "make distcheck." 2018-07-31 19:46:00 -04:00
Nick Mathewson
76e10ee6b9 Use NSS for AES_CTR. 2018-07-31 19:46:00 -04:00
Nick Mathewson
60705a5719 Use NSS in crypto_rand.c
This is comparatively straightforward too, except for a couple of
twists:

   * For as long as we're building with two crypto libraries, we
     want to seed _both_ their RNGs, and use _both_ their RNGs to
     improve the output of crypto_strongest_rand()

   * The NSS prng will sometimes refuse to generate huge outputs.
     When it does, we stretch the output with SHAKE.  We only need
     this for the tests.
2018-07-31 19:46:00 -04:00
Nick Mathewson
be8d497b65 Make sure NSS is initialized before running benchmarks 2018-07-31 19:46:00 -04:00
Nick Mathewson
f64c9dccde Use NSS's digest code in Tor.
This was a fairly straightforward port, once I realized which layer
I should be calling into.
2018-07-31 19:46:00 -04:00
Nick Mathewson
772106c6bc Add a new function, tor_api_get_provider_version()
Closes ticket 26947.
2018-07-31 09:18:54 -04:00
Nick Mathewson
7e4ac0283e Merge remote-tracking branch 'teor/bug26986' 2018-07-31 08:50:38 -04:00
Nick Mathewson
a67d153cc7 Always call tor_free_all() when exiting tor_run_main()
We would usually call it through tor_cleanup(), but in some code
paths, we wouldn't. These paths would break restart-in-process,
since leaving fields uncleared would cause assertion failures on
restart.

Fixes bug 26948; bugfix on 0.3.3.1-alpha
2018-07-31 08:45:17 -04:00
Roger Dingledine
fe9f585143 fix wrong word in comment 2018-07-30 22:35:33 -04:00
teor
9118430b14 Use Windows-compatible format strings in tor-print-ed-signing-cert.c
Fixes bug 26986; bugfix on master.
2018-07-31 11:21:28 +10:00
teor
e26794ace9 Add TOR_PRIdSZ to torint.h 2018-07-31 11:21:28 +10:00
Nick Mathewson
acb54dee7b Remove a now-obsolete comment about deadcode_dummy__ 2018-07-30 09:09:10 -04:00
Nick Mathewson
70b16bc679 Merge branch 'ticket26890' 2018-07-30 09:08:39 -04:00
Nick Mathewson
21babc8d3f Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-30 09:01:59 -04:00
Nick Mathewson
3a6bd21440 Merge remote-tracking branch 'teor/bug26627_033_merged_master' 2018-07-30 09:01:55 -04:00
Nick Mathewson
4f854dbdc2 Merge remote-tracking branch 'teor/bug26627_033' into maint-0.3.3 2018-07-30 09:01:45 -04:00
Nick Mathewson
49d8a2109f Update include in tor-print-ed-signing-cert 2018-07-30 08:57:18 -04:00
Nick Mathewson
ff593ae878 Merge remote-tracking branch 'rl1987/feature19506_3' 2018-07-30 08:55:57 -04:00
Nick Mathewson
13393b2d91 Merge remote-tracking branch 'rl1987/ticket21349_4' 2018-07-30 08:49:49 -04:00
Nick Mathewson
7d66ec0feb Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-30 08:45:01 -04:00
Nick Mathewson
a159eaf45f Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-30 08:45:01 -04:00
Nick Mathewson
ec1ced3cc1 Merge remote-tracking branch 'teor/bug26924' 2018-07-30 08:44:58 -04:00
Nick Mathewson
fea35ddf00 Merge remote-tracking branch 'teor/bug26924_032' into maint-0.3.2 2018-07-30 08:44:40 -04:00
Nick Mathewson
ac9d08f66a Merge remote-tracking branch 'juga/ticket3723_03_squashed_rebased' 2018-07-30 08:33:59 -04:00
Nick Mathewson
811ed8cf9f Merge remote-tracking branch 'rl1987/bug26892_take2' 2018-07-30 08:24:14 -04:00
Nick Mathewson
d102e9c2e4 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-30 08:17:25 -04:00
Nick Mathewson
5823e62fa2 Merge branch 'maint-0.3.4' 2018-07-30 08:17:25 -04:00
Nick Mathewson
15d7f24c57 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-30 08:17:24 -04:00
Taylor Yu
a8bdb851eb Don't disable an unsupported compiler warning
Conditionalize the pragma that temporarily disables
-Wunused-const-variable.  Some versions of gcc don't support it.  We
need to do this because of an apparent bug in some libzstd headers.
Fixes bug 26785; bugfix on 0.3.2.11.
2018-07-26 12:32:34 -05:00
rl1987
ffdfd39d4f Early bailout from log_addr_has_changed() if running as client 2018-07-26 17:49:27 +03:00
teor
db2a9180be
Remove comment about Tor2web
Part of #26367.
2018-07-25 17:40:20 +10:00
teor
d01602bebb Merge branch 'bug26924_032' into bug26924
Update rendcommon.h include path.
2018-07-25 14:50:45 +10:00
teor
859d5a7375 Improve connection auth logging
Improve the log message when connection initiators fail to authenticate
direct connections to relays.

Fixes bug 26927; bugfix on 0.3.0.1-alpha.
2018-07-25 14:39:31 +10:00
teor
fdc3ad6259 Merge branch 'bug26924_029' into bug26924_032 2018-07-25 14:33:10 +10:00
teor
6443812e34 Stop logging link auth warnings on Single Onion Services and Tor2web
Instead, log a protocol warning when single onion services or
Tor2web clients fail to authenticate direct connections to relays.

Fixes bug 26924; bugfix on 0.2.9.1-alpha.
2018-07-25 14:30:33 +10:00
teor
fc4d08e260 Merge branch 'bug26627_033' into bug26627_033_merged_master 2018-07-25 09:17:17 +10:00
teor
3821081a55 Stop putting unsupported ed25519 link auth in v3 onion service descs
Stop putting ed25519 link specifiers in v3 onion service descriptors,
when the intro point doesn't support ed25519 link authentication.

Fixes bug 26627; bugfix on 0.3.2.4-alpha.
2018-07-25 09:16:15 +10:00
teor
a99920c7d4 Stop sending unsupported ed25519 link specifiers in v3 introduce cells
Stop sending ed25519 link specifiers in v3 onion service introduce
cells, when the rendezvous point doesn't support ed25519 link
authentication.

Fixes bug 26627; bugfix on 0.3.2.4-alpha.
2018-07-25 09:16:04 +10:00
rl1987
042d22c8d1 Split select_entry_guard_for_circuit() 2018-07-21 18:38:33 +03:00
rl1987
e6c51a056c Make entry_guards_update_primary() shorter 2018-07-21 18:38:33 +03:00
rl1987
86549c0d9e Split sampled_guards_update_from_consensus() into subfunctions 2018-07-21 18:38:33 +03:00
Neel Chauhan
f80cfc4476 Add a "reject *:*" line after parsing in parse_reachable_addresses() 2018-07-20 21:38:28 -04:00
Neel Chauhan
fe18776349 Don't prepend reject *:* to Reachable(OR/Dir)Addresses in options_validate() 2018-07-20 21:36:23 -04:00
rl1987
9c34f95b89 Scrub IP in channel_tls_process_netinfo_cell() if SafeLogging is on 2018-07-20 21:13:38 +03:00
Nick Mathewson
c515dc8d0d Remove over-cleverness from our coverity BUG() definition.
Our previous definition implied that code would never keep running
if a BUG occurred (which it does), and that BUG(x) might be true
even if x was false (which it can't be).

Closes ticket 26890. Bugfix on 0.3.1.4-alpha.
2018-07-20 11:19:54 -04:00
Nick Mathewson
9ae3597540 Tweak assertion in get_time_period_length() for coverity
This is another attempt to fix 1437668.  The assertion here should
be safe, since the rules of networkstatus_get_param() keep the value
it returns in range.
2018-07-20 11:02:07 -04:00
Nick Mathewson
977821e59f Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-20 10:42:29 -04:00
Nick Mathewson
dbf57ecf39 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-20 10:42:29 -04:00
Nick Mathewson
583df33e20 Merge branch 'maint-0.3.4' 2018-07-20 10:42:29 -04:00
Nick Mathewson
be3a962ca7 Merge branch 'ticket26647_032' into maint-0.3.2 2018-07-20 10:42:23 -04:00
Nick Mathewson
3c49019016 Merge branch 'maint-0.3.4' 2018-07-19 14:34:26 -04:00
Nick Mathewson
7260d07fee Fix linking when dirauth module is disabled.
Bugfix on dcee4d4c9c, bug not in any
released Tor.
2018-07-19 14:33:18 -04:00
Nick Mathewson
c1092e9aab Merge remote-tracking branch 'ahf-github/bugs/26780' 2018-07-19 12:22:39 -04:00
Nick Mathewson
7253603e6b Merge branch 'bug26712' 2018-07-19 12:20:13 -04:00
Nick Mathewson
b44fce6716 Merge branch 'maint-0.3.4' 2018-07-19 08:32:00 -04:00
Nick Mathewson
0a60a94a55 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-19 08:31:07 -04:00
Nick Mathewson
27f5bd52fe Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-19 08:31:07 -04:00
Nick Mathewson
209332e71a Merge remote-tracking branch 'teor/bug26853_032' into maint-0.3.2 2018-07-19 08:30:59 -04:00
Roger Dingledine
144fc9bef1 wrap a multi-line if body in { } before somebody gets hurt 2018-07-18 21:23:35 -04:00
Nick Mathewson
9e247ac271 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-18 16:39:10 -04:00
Nick Mathewson
39d3187b0d Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-18 16:39:10 -04:00
Nick Mathewson
78386d8cdd Merge branch 'maint-0.2.9' into maint-0.3.2 2018-07-18 16:39:10 -04:00
Nick Mathewson
501deba8cf Try putting ulimit -c 0 in test_bt.sh to see if it fixes bug 26787 2018-07-18 16:33:48 -04:00
Nick Mathewson
42c02097db Add two more dependencies in build.rs 2018-07-18 16:20:31 -04:00
Nick Mathewson
0c4c5eeb55 Use the "testing" variant of several C libraries in build.rs 2018-07-18 16:18:25 -04:00
Nick Mathewson
e2261e7727 Merge remote-tracking branch 'isis/bug26398' 2018-07-18 16:12:29 -04:00
Nick Mathewson
23811052fe Add some missing includes and struct declarations. 2018-07-18 15:12:18 -04:00
Nick Mathewson
61e080e24a Merge branch 'maint-0.3.4' 2018-07-18 15:09:28 -04:00
Nick Mathewson
a7bd20ebaf Merge branch 'maint-0.3.3' into maint-0.3.4 2018-07-18 15:08:57 -04:00
Nick Mathewson
c31700d664 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-07-18 15:04:14 -04:00
Nick Mathewson
559f79fd79 Merge branch 'maint-0.2.9' into maint-0.3.2 2018-07-18 15:03:27 -04:00