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
Nick Mathewson
a321d72401
Merge branch 'bug26485_029_squashed' into maint-0.2.9
2018-07-18 15:01:03 -04:00
Nick Mathewson
fd5dce0a1b
Add a test for format_recommended_version_list.
2018-07-18 15:00:53 -04:00
Nick Mathewson
8ee1fe7aa7
Warn when an authority has voted for a version with a space in it.
...
Another way to try to prevent a recurrence of 26485.
2018-07-18 15:00:53 -04:00
Nick Mathewson
dcee4d4c9c
Warn the directory authority operator if their versions list is bogus
...
Prevents bug 26485; bugfix on 0.1.1.6-alpha.
2018-07-18 15:00:53 -04:00
Nick Mathewson
ef5c3c8216
Merge branch 'ulimit_when_crashing'
2018-07-18 09:38:04 -04:00
teor
449d190e2e
SKIP test_key_expiration.sh on Windows until the underlying issue is resolved
...
Skip an unreliable key expiration test on Windows, until the underlying
issue in bug 26076 is resolved.
Fixes bug 26853; bugfix on 0.3.2.1-alpha.
2018-07-18 12:37:12 +10:00
Nick Mathewson
ee12c11dd4
Increase line coverage in libtor-string to 100%
...
(On linux.)
2018-07-17 16:47:32 -04:00
Nick Mathewson
e2b744ce38
Merge branch 'bug25552_ope_squashed'
2018-07-17 16:19:32 -04:00
George Kadianakis
14b507e520
Improve a log message.
2018-07-17 15:57:46 -04:00
George Kadianakis
9e6235d290
Fix time source bug in sr_state_get_start_time_of_current_protocol_run().
...
The following bug was causing many issues for this branch in chutney:
In sr_state_get_start_time_of_current_protocol_run() we were using the
consensus valid-after to calculate beginning_of_current_round, but we were
using time(NULL) to calculate the current_round slot. This was causing time
sync issues when the consensus valid-after and time(NULL) were disagreeing on
what the current round is. Our fix is to use the consensus valid-after in both
places.
This also means that we are not using 'now' (aka time(NULL)) anymore in that
function, and hence we can remove that argument from the function (and its
callers). I'll do this in the next commit so that we keep things separated.
Furthermore, we fix a unittest that broke.
2018-07-17 15:57:46 -04:00
George Kadianakis
4cfade2f46
Set revision counter before uploading, not during building.
...
We only build a descriptor once, and we just re-encode it (and change its intro
points if needed) before uploading.
Hence we should set the revision counter before uploading, not during building.
2018-07-17 15:57:46 -04:00
George Kadianakis
0140052a35
Make the OPE scheme return CRYPTO_OPE_ERROR on error.
...
Instead of UINT64_MAX.
2018-07-17 15:57:46 -04:00
George Kadianakis
d8b71609cb
Compute OPE cipher structure only when needed.
...
The OPE cipher is tied to the current blinded key which is tied to the current
time period. Hence create the OPE cipher structure when we create a new
descriptor (and build its blinded key).
2018-07-17 15:57:46 -04:00
George Kadianakis
1d2333405e
Remove now useless rev counter state file code.
...
We are not using the state file for rev counters anymore, we just generate them
on the fly!
2018-07-17 15:57:46 -04:00
George Kadianakis
2e8d4139a7
Fix up some unittests by being more careful with the local time.
...
Now that the rev counter depends on the local time, we need to be more careful
in the unittests. Some unittests were breaking because they were using
consensus values from 1985, but they were not updating the local time
appropriately. That was causing the OPE module to complain that it was trying
to encrypt insanely large values.
2018-07-17 15:57:46 -04:00
George Kadianakis
5fb6f656df
Use approx_time() instead of time(NULL) in some HS functions.
...
These were breaking our unittests.
2018-07-17 15:57:46 -04:00
George Kadianakis
05c362274b
Compute the description revision counter using the OPE scheme.
...
To do so for a given descriptor, we use the "seconds since the SR protocol run"
started, for the SRV that is relevant to this descriptor. This is guaranteed to
be a positive value (since we need an SRV to be able to build a descriptor),
and it's also guaranteed to be a small value (since SRVs stop being listed on a
consensus after 48 hours).
We cannot use the "seconds since the time period started", because for the next
descriptor we use the next time period, so the timestamp would end up negative.
See [SERVICEUPLOAD] from rend-spec-v3.txt for more details.
To do so, we have to introduce a new `is_current` argument to a bunch of
functions, because to use "seconds since the SR protocol run" we need to know
if we are building the current or the next descriptor, since we use a different
SRV for each descriptor.
2018-07-17 15:57:46 -04:00
George Kadianakis
deec6913c5
Introduce useful SRV funcs (start time of prev protocol run)
2018-07-17 15:57:46 -04:00
George Kadianakis
34a5eb5904
Increase OPE_INPUT_MAX.
2018-07-17 15:57:46 -04:00
Nick Mathewson
3a45f6ffe9
Implementation for a simple order-preserving encryption scheme.
...
This is meant for use when encrypting the current time within the
period in order to get a monotonically increasing revision counter
without actually revealing our view of the time.
This scheme is far from the most state-of-the-art: don't use it for
anything else without careful analysis by somebody much smarter than
I am.
See ticket #25552 for some rationale for this logic.
2018-07-17 15:57:46 -04:00
Nick Mathewson
304ee896d1
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-17 14:56:52 -04:00
Nick Mathewson
28d1057d56
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-07-17 14:56:52 -04:00
Nick Mathewson
61a2762e35
Merge branch 'maint-0.2.9' into maint-0.3.2
2018-07-17 14:56:52 -04:00
Nick Mathewson
12afdcc15a
Merge branch 'maint-0.3.4'
2018-07-17 14:56:52 -04:00
teor
6dafddd05d
SKIP test_keygen.sh on Windows until the underlying issue is resolved
...
Skip an unreliable key generation test on Windows, until the underlying
issue in bug 26076 is resolved.
Fixes bug 26830; bugfix on 0.2.7.3-rc.
2018-07-17 14:56:18 -04:00
Nick Mathewson
4833717d69
Merge branch 'maint-0.3.4'
2018-07-17 14:46:16 -04:00
Nick Mathewson
c7dcf252fd
Merge remote-tracking branch 'ahf-github/bugs/26437'
2018-07-17 14:33:31 -04:00
Neel Chauhan
32db806dfa
Teach the OOM handler about the DNS cache
2018-07-17 09:19:27 -04:00
rl1987
8645647250
Fix build to work with --disable-unittests again
2018-07-17 12:09:34 +00:00
Kevin Gallagher
4ba26f95d5
control: Add new 'uptime' message to GETINFO
...
Sends the Tor controller the uptime in seconds.
Highly useful for monitoring purposes.
2018-07-16 19:19:10 -07:00
Neel Chauhan
d807ca1b01
Add and use dns_cache_total_allocation()
2018-07-16 17:19:53 -04:00
David Goulet
5aaea38d88
Merge remote-tracking branch 'pastly/issue26703'
2018-07-16 14:44:45 -04:00
teor
79f249e786
dirauth: Handle V3BandwidthsFile failure modes according to the new spec
...
If an authority is not configured with a V3BandwidthsFile, this line
SHOULD NOT appear in its vote.
If an authority is configured with a V3BandwidthsFile, but parsing
fails, this line SHOULD appear in its vote, but without any headers.
Part of 3723, implements the spec in 26799.
2018-07-16 14:43:49 +00:00
juga0
9773311b20
Add keyval header, that was moved to other file
2018-07-16 14:43:49 +00:00
juga0
c6aee94d19
Add tests for max length bw file headers
2018-07-16 14:43:49 +00:00
juga0
8164534f46
Ensure that bw_file_headers is not bigger than max
2018-07-16 14:43:49 +00:00
juga0
317d930f08
Add test with NULL bw_file_header
...
and complete v1.0.0 bandwidth file
2018-07-16 14:43:49 +00:00
juga0
e87793bae5
Move bandwidth file tests to same function
...
also add tests for bw_file_headers.
Headers are all that is found before a correct relay line or
the terminator.
Tests include:
* a empty bandwidth file
* a bandwidth file with only timestamp
* a bandwidth file with v1.0.0 headers
* a bandwidth file with v1.0.0 headers and relay lines
* a bandwidth file with v1.1.0 headers and v1.0.0 relay lines
* a bandwidth file with v1.0.0 headers, malformed relay lines and
relay lines
* a bandwidth file with v1.0.0 headers, malformed relay lines,
relay lines and malformed relay lines
* a bandwidth file with v1.1.0 headers without terminator
* a bandwidth file with v1.1.0 headers with terminator
* a bandwidth file with v1.1.0 headers without terminator and
relay lines
* a bandwidth file with v1.1.0 headers with terminator and relay
lines
* a bandwidth file with v1.1.0 headers without terminator, bad
relay lines and relay lines
* a bandwidth file with v1.1.0 headers with terminator, bad relay
lines and relay lines
2018-07-16 14:43:49 +00:00
juga0
87fc409a70
Replace bwlist by bw_file and terminator condition
...
If bandwidth file terminator is found, set end of headers flag
and do not store the line.
If it is not, parse a relay line and check whether it is a header
line.
2018-07-16 14:43:49 +00:00
juga0
f906d9be11
Replace bwlist by bw_file
...
and add bw file terminator constant
2018-07-16 14:43:49 +00:00
juga0
d79c65772b
Rename bwlist to bw_file and banwidth to
...
bandwidth-file
2018-07-16 14:43:49 +00:00
juga0
6d8bc12583
Free bw_list_headers in networstatus_t
2018-07-16 14:43:49 +00:00
juga0
106eb08d27
Add bw_file_headers to networkstatus_t
2018-07-16 14:43:49 +00:00
juga0
f0a4a5f726
Check that the header is key_value
...
to avoid interpreting as headers extra lines that are not key_values
2018-07-16 14:43:49 +00:00
juga0
086060e138
Do not add bw file line to the vote
...
when there are not bw file headers lines.
2018-07-16 14:43:49 +00:00
juga0
e5dd46beab
Add the Bandwidth List file headers to votes
...
* add bwlist_headers argument to dirserv_read_measured_bandwidth
in order to store all the headers found when parsing the file
* add bwlist_headers to networkstatus_t in order to store the
the headers found by the previous function
* include the bandwidth headers as string in vote documents
* add test to check that dirserv_read_measured_bandwidth generates
the bwlist_headers
2018-07-16 14:43:48 +00:00
Nick Mathewson
f8e9c4a894
Try putting ulimit -c 0 in test_bt.sh to see if it fixes bug 26787
2018-07-16 07:53:43 -04:00
Nick Mathewson
8505522e50
Avoid a use-after-null-check in proto_socks.c
...
Coverity rightly complains that early in the function we're checking
whether username is NULL, and later we're passing it unconditionally
to strlen().
Fixes CID 1437967. Bug not in any released Tor.
2018-07-16 07:51:11 -04:00
Nick Mathewson
ef234ba303
Merge branch 'socks_trunnel4_squashed_merged'
2018-07-15 17:07:20 -04:00
Nick Mathewson
f608cc0f31
Merge remote-tracking branch 'tor-github/pr/179'
2018-07-13 18:30:17 -04:00
Nick Mathewson
27dd2b1f1f
Make nss get initialized before we fuzz anything.
2018-07-13 12:35:22 -04:00
Nick Mathewson
d811ce2421
Add postfork support for nss
...
We need this in our unit tests, since otherwise NSS will notice
we've forked and start cussing us out.
I suspect we'll need a different hack for daemonizing, but this
should be enough for tinytest to work.
2018-07-13 12:35:22 -04:00
Nick Mathewson
c317e78dd7
Initialize and shut down NSS.
...
This is largely conjectural, based on online documentation for NSS
and NSPR.
2018-07-13 12:35:22 -04:00
Alexander Færøy
46501cdd18
Fix forking tests on Windows when there is a space in the path.
...
See: https://bugs.torproject.org/26437
2018-07-13 12:46:18 +02:00
Alexander Færøy
c9de65f966
Add checks in get_net_param_from_list() for valid output domain.
...
This patch adds two assertions in get_net_param_from_list() to ensure
that the `res` value is correctly within the range of the output domain.
Hopefully fixes Coverity CID #1415721 , #1415722 , and #1415723 .
See: https://bugs.torproject.org/26780
2018-07-13 12:43:57 +02:00
Nick Mathewson
710188f84e
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-07-12 14:32:16 -04:00
Nick Mathewson
98ee23ca1e
Merge branch 'maint-0.2.9' into maint-0.3.2
2018-07-12 14:32:16 -04:00
Nick Mathewson
e0f33c1d3e
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-12 14:32:16 -04:00
Nick Mathewson
b6c50c6259
Merge branch 'maint-0.3.4'
2018-07-12 14:32:16 -04:00
Nick Mathewson
04512d9fcd
SOCKS: Always free username/password before setting them.
...
This fixes a memory leak found by fuzzing.
2018-07-12 14:20:56 -04:00
Nick Mathewson
2d0e1cef20
Add fuzzing wrapper for fetch_from_buf_socks()
2018-07-12 14:20:46 -04:00
Roger Dingledine
cd4795ca3e
put new bridge auth Serge into place
...
The "Bifroest" bridge authority has been retired; the new bridge authority
is "Serge", and it is operated by George from the TorBSD project.
Closes ticket 26771.
2018-07-12 14:12:13 -04:00
Nick Mathewson
7556933537
Merge branch 'socks_trunnel4_squashed' into socks_trunnel4_squashed_merged
2018-07-12 11:47:25 -04:00
rl1987
ba3121191b
Use constants for possible values of first octet
2018-07-12 11:41:44 -04:00
rl1987
f27dc41627
Remove prop229 stuff from socks5.trunnel
2018-07-12 11:41:44 -04:00
rl1987
4c845fcf9e
Rework socks_request_set_socks5_error() with trunnel
2018-07-12 11:41:44 -04:00
rl1987
a6af21c1b7
Document new code
2018-07-12 11:41:44 -04:00
rl1987
58cb2ed243
Fix buf_t advancement in fetch_buf_from_socks
...
We pullup 512 bytes of input to make sure that at least one SOCKS
message ends up in head of linked list
2018-07-12 11:41:44 -04:00
rl1987
01cf3007b5
Make a distinction between truncated message and expecting more messages
2018-07-12 11:41:42 -04:00
rl1987
fb105404f2
Fix whitespace/formatting
2018-07-12 11:41:20 -04:00
rl1987
d2e54ff8a5
Remove legacy SOCKS5 phase 2 code
2018-07-12 11:41:05 -04:00
rl1987
94706a427a
Add CMD_RESOLVE to socks5_client_request
2018-07-12 11:41:05 -04:00
rl1987
bcbd3fb71e
Second phase of SOCKS5
2018-07-12 11:41:05 -04:00
rl1987
57342b19f5
Remove legacy RFC1929 code
2018-07-12 11:41:05 -04:00
rl1987
9068ac3cac
Implement SOCKS5 user/pass handling
2018-07-12 11:41:04 -04:00
rl1987
75106a26b4
Fix type in socks5.trunnel
2018-07-12 11:40:49 -04:00
rl1987
853d9b869d
Remove legacy SOCKS5 phase 1 code
2018-07-12 11:40:49 -04:00
rl1987
63c478c1c4
Call new SOCKS code from parse_socks, to parse multiple packets in row
2018-07-12 11:40:49 -04:00
rl1987
27333b2298
Reimplement phase 1 of SOCKS5 using trunnel
...
squash! Reimplement phase 1 of SOCKS5 using trunnel
2018-07-12 11:40:49 -04:00
rl1987
c6a0b04d33
Remove legacy SOCKS4 code
2018-07-12 11:40:49 -04:00
rl1987
b160929c22
Add RESOLVE (0xF0) command to socks4_client_request
2018-07-12 11:40:49 -04:00
rl1987
9155e08450
Parsing SOCKS4/4a request using trunnel impl
2018-07-12 11:40:49 -04:00
Roger Dingledine
0317eb143e
Remove a redundant typedef in proto_ext_or.h
2018-07-12 11:02:22 -04:00
Nick Mathewson
4ac87a430f
Remove a redundant typedef in addr_policy_st.h
2018-07-12 10:35:29 -04:00
Nick Mathewson
a7ec493d88
Merge remote-tracking branch 'imnotbad/bug26663'
2018-07-12 08:59:23 -04:00
Nick Mathewson
f45107e7de
Rename crypto.c to crypto_cipher.c (since that's all it still has.)
2018-07-11 14:12:36 -04:00
Nick Mathewson
9010797e63
Remove most includes from crypto.c
2018-07-11 14:02:23 -04:00
Nick Mathewson
922208bd2d
Extract and rename crypto_log_errors().
2018-07-11 13:54:47 -04:00
Nick Mathewson
8e2df98860
Move crypto_add_spaces_to_fp() to crypto_rsa.c
2018-07-11 13:51:26 -04:00
Nick Mathewson
12a1ada158
Move the initialization and cleanup parts of crypto.c
...
These are now part of crypto_init.c. The openssl-only parts now
live in crypto_openssl_mgt.c.
I recommend reviewing this patch with -b and --color-moved.
2018-07-11 13:45:49 -04:00
Nick Mathewson
79267bad65
Add a configure switch to build with NSS.
...
When it is set, include the NSS headers and libraries as
appropriate. Doesn't actually use them yet, though.
2018-07-11 13:22:20 -04:00
Nick Mathewson
92db96d80f
Make our crypto library symbolic in the makefiles.
2018-07-11 12:51:36 -04:00
Nick Mathewson
2b52360448
Only use OpenSSL kdf support if it is present.
...
We have to check for ERR_load_KDF_strings() here, since that's the
only one that's actually a function rather than a macro.
Fixes compilation with LibreSSL. Fixes bug 26712; bug not in
any released Tor.
2018-07-11 10:19:06 -04:00
Nick Mathewson
5aee26ee46
Move all use cases of micro-revision.i to a single place
...
That place is git-revision.c; git-revision.c now lives in lib/log.
Also fix the compilation rules so that all object files that need
micro-revision.i depend on it.
2018-07-11 09:52:39 -04:00
Nick Mathewson
537092cdbb
Merge branch 'ticket26223'
2018-07-10 20:18:28 -04:00
Nick Mathewson
c90961a923
Document compat_getdelim_.
2018-07-10 20:18:20 -04:00
Nick Mathewson
391ef5e42c
Explain why we use raw_free with getdelim result.
2018-07-10 20:16:37 -04:00
Nick Mathewson
b6d0e7caa4
Rename tm_cvt to time_to_tm
2018-07-10 15:25:53 -04:00
Nick Mathewson
e7f5f48d68
Rename torlog.[ch] to log.[ch]
...
Fun fact: these files used to be called log.[ch] until we ran into
conflicts with systems having a log.h file. But now that we always
include "lib/log/log.h", we should be fine.
2018-07-10 15:20:30 -04:00
Nick Mathewson
41640b6573
Rename util_malloc to malloc.
2018-07-10 15:16:57 -04:00
Nick Mathewson
6711a172c0
Merge remote-tracking branch 'neel/fbsd-cfix'
2018-07-10 14:50:49 -04:00
Nick Mathewson
a2c44a7a7e
Isolate resolve.h usage in the modules that really need it.
...
(Almost none of Tor should actually need to touch the platform resolver.)
2018-07-10 13:36:45 -04:00
Nick Mathewson
8de48c111c
Remove addr_port_lookup.
...
This lets us cut the dependency from address.c to resolve.c: the
address.c module now has no paths to the libc resolver in it.
2018-07-10 13:32:37 -04:00
Nick Mathewson
2f657a1416
Remove all users of addr_port_lookup outside of address.c
...
This function has a nasty API, since whether or not it invokes the
resolver depends on whether one of its arguments is NULL. That's a
good way for accidents to happen.
This patch incidentally makes tor-resolve support socks hosts on
IPv6.
2018-07-10 13:23:37 -04:00
Nick Mathewson
c2ddb7b231
Move tor_addr_{,port_}lookup to resolve.c
2018-07-10 13:00:02 -04:00
Nick Mathewson
5d8336c182
Refactor ipv[46].[ch]
...
These are now combined into an inaddr.[ch], since their purpose is
to implement functions for struct in_addr and struct in6_addr.
The definitions for in6_addr and its allies are now in a separate
header, inaddr_st.h.
Closes ticket 26532.
2018-07-10 12:50:38 -04:00
Neel Chauhan
6d58c20d94
Fix build on FreeBSD post-refactor
2018-07-10 12:32:14 -04:00
Nick Mathewson
ef106ce788
Document the headers in src/app/config/
2018-07-10 12:28:31 -04:00
Nick Mathewson
4f42c923d6
File-level summary documentation for src/lib/*/*.[ch]
2018-07-10 12:22:01 -04:00
Nick Mathewson
e3e6335a08
Add controller support for listing ExtORPort and HTTPTunnelPorts
...
Closes ticket 26647.
2018-07-10 10:50:43 -04:00
Nick Mathewson
951d59d706
Use tor_getline() in dirserv.c to remove its upper line limit.
...
Closes ticket 26223.
2018-07-10 10:36:49 -04:00
Nick Mathewson
6574d4bd27
Refactor dirserv_read_measured_bandwidths to have a single exit point
2018-07-10 10:36:49 -04:00
Nick Mathewson
b04d719c10
Integrate getdelim() and getline() support into Tor.
2018-07-10 10:36:49 -04:00
Nick Mathewson
1604c0fe0e
Add the compatibility definition for getdelim.c from netbsd.
...
We shouldn't actually need this code nearly anywhere we build:
getdelim is POSIX, and mingw provides it.
2018-07-10 10:14:24 -04:00
Nick Mathewson
5ce348c4c7
Bump to 0.3.4.4-rc-dev
2018-07-09 15:17:38 -04:00
Nick Mathewson
f5e3bcb60b
Bump to 0.3.3.8-dev.
2018-07-09 15:17:16 -04:00
Nick Mathewson
19f2057d49
Fix some lingering windows compilation issues from Jenkins.
...
These were caused by the recent refactoring.
2018-07-09 12:54:40 -04:00
Nick Mathewson
eb856a3e51
strcasecmp should not take a size_t argument
2018-07-09 11:17:23 -04:00
Matt Traudt
d20feddfcc
Lower log level of "Scheduler of type KIST has been enabled" to INFO
2018-07-09 10:48:43 -04:00
Nick Mathewson
98dff5df3f
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-09 10:17:20 -04:00
Nick Mathewson
250e0fc1c4
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-07-09 10:17:20 -04:00
Nick Mathewson
1b81c4b5f3
Merge branch 'maint-0.3.4'
2018-07-09 10:17:20 -04:00
Nick Mathewson
6ad2c2b92f
Merge remote-tracking branch 'github/bug26269_031' into maint-0.3.2
2018-07-09 10:17:17 -04:00
Nick Mathewson
e7463be39b
Merge branch 'maint-0.3.4'
2018-07-09 10:16:51 -04:00
Nick Mathewson
83de46eb25
Changes file and comment for 25928.
2018-07-09 10:16:48 -04:00
Nick Mathewson
529faef28e
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-09 10:15:16 -04:00
Nick Mathewson
69918629f5
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-07-09 10:14:43 -04:00
Nick Mathewson
4a604d9938
Merge branch 'maint-0.2.9' into maint-0.3.2
2018-07-09 10:14:43 -04:00
Nick Mathewson
8b53dfc362
Merge branch 'bug26269_029' into maint-0.2.9
2018-07-09 10:14:39 -04:00
Nick Mathewson
7746b071d8
Merge remote-tracking branch 'gsomlo/gls-single-da'
2018-07-09 09:59:46 -04:00
Nick Mathewson
a1a55a33c2
Merge branch 'bug26488'
2018-07-09 09:37:14 -04:00
rl1987
46998fc8fd
Validate that DirAuthority address is IPv4
2018-07-09 09:37:09 -04:00
Nick Mathewson
03283c00d8
Merge remote-tracking branch 'rl1987/bug26525'
2018-07-09 09:31:12 -04:00
Nick Mathewson
532873a924
Bump to 0.3.3.8
2018-07-09 09:24:07 -04:00
Nick Mathewson
9320100d6e
Bump to 0.3.3.4-rc
2018-07-09 09:23:39 -04:00
Nick Mathewson
a95cfb8a58
Clear all control.c flags on control_free_all()
...
Fixes bug 25512.
(Cherry-picked from 3519d0c808
2018-07-09 09:20:45 -04:00
Nick Mathewson
8e3a52e5c3
Merge branch 'maint-0.3.4'
2018-07-09 09:14:41 -04:00
Nick Mathewson
75d9db9e5b
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-09 09:14:37 -04:00
Nick Mathewson
f721a08220
Merge remote-tracking branch 'catalyst-github/bug26455_033' into maint-0.3.3
2018-07-09 09:13:58 -04:00
Nick Mathewson
75f7064a13
Merge branch 'maint-0.3.4'
2018-07-09 09:11:42 -04:00
Nick Mathewson
d3894dc34b
Merge branch 'maint-0.2.9' into maint-0.3.2
2018-07-09 09:11:41 -04:00
Nick Mathewson
1af69c1812
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-09 09:11:41 -04:00
Nick Mathewson
451a84cecb
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-07-09 09:11:41 -04:00
Nick Mathewson
fead22fb2a
Merge remote-tracking branch 'mikeperry/bug25705_v3_033' into maint-0.3.3
2018-07-09 09:08:58 -04:00
Nick Mathewson
b8554dd880
Make Tor compile with --disable-memory-sentinels again
2018-07-09 08:44:16 -04:00
rl1987
2558634f0c
Tool to print expiration date of ed25519_signing_cert
2018-07-08 15:13:33 +02:00
Kaidan
abeb07a1bf
Made 'auto' keyword in torrc case insensitive
2018-07-08 00:15:16 +10:00
Karsten Loesing
9faa28b60e
Update geoip and geoip6 to the July 3 2018 database.
2018-07-06 20:54:03 +02:00
Nick Mathewson
10c782d7fa
Move ntmain.c into libtor-app again
...
It's needed by main.c
Fixes bug 26662; bug not in any released Tor.
2018-07-06 13:59:40 -04:00
Nick Mathewson
50963f36d7
Actually sort the lines in src/core/include.am
2018-07-05 17:15:50 -04:00
Nick Mathewson
667a6e8fe9
Whoops. Protover.[ch] belong in src/core/or
2018-07-05 17:15:50 -04:00
Nick Mathewson
f720a5a439
Fix everything that previously referred to src/or
2018-07-05 17:15:50 -04:00
Nick Mathewson
5f51c2de8b
Fix our build system to know the new locations of the src/or stuff
2018-07-05 17:15:50 -04:00
Nick Mathewson
ef486e3c02
Fix every include path changed in the previous commit (automated)
...
I am very glad to have written this script.
2018-07-05 17:15:50 -04:00
Nick Mathewson
63b4ea22af
Move literally everything out of src/or
...
This commit won't build yet -- it just puts everything in a slightly
more logical place.
The reasoning here is that "src/core" will hold the stuff that every (or
nearly every) tor instance will need in order to do onion routing.
Other features (including some necessary ones) will live in
"src/feature". The "src/app" directory will hold the stuff needed
to have Tor be an application you can actually run.
This commit DOES NOT refactor the former contents of src/or into a
logical set of acyclic libraries, or change any code at all. That
will have to come in the future.
We will continue to move things around and split them in the future,
but I hope this lays a reasonable groundwork for doing so.
2018-07-05 17:15:50 -04:00
Nick Mathewson
81cb0afb2b
Start splitting src/or
...
This is a very gentle commit that just lays the groundwork in the
build system: it puts the include files to build libtor-app.a into
src/core, and to build the tor executable into src/app. The
executable is now "src/app/tor".
2018-07-05 17:15:50 -04:00
Nick Mathewson
4eac5c6ce6
And tell build.rs to stop looking in src/common
2018-07-05 17:15:24 -04:00
Nick Mathewson
c73bb9937d
Fix build.rs to handle removed common.
2018-07-05 17:14:55 -04:00
Nick Mathewson
753b797ca4
Fix up .may_includes for evloop.
2018-07-05 15:50:20 -04:00
Nick Mathewson
1dd5b5f441
Add a missing include.
2018-07-05 15:44:33 -04:00
Nick Mathewson
2d69c32bb6
Clean up include paths for libtor-evloop (automated)
2018-07-05 15:22:17 -04:00
Nick Mathewson
1e417b7275
All remaining files in src/common belong to the event loop.
2018-07-05 15:22:17 -04:00
Nick Mathewson
947de40d19
Move openbsd-malloc responsibility to lib/malloc
...
(Note that this is not believed to work, but we may as well have it
in the right place till we remove it)
2018-07-05 15:07:08 -04:00
Nick Mathewson
4593829861
Remove util.h
...
Inline its contents (which were all includes) into or.h, and some of
its contents into other places that didn't include or.h at all.
2018-07-05 15:04:18 -04:00
Nick Mathewson
0adcfbc7c8
Move address_set to src/or
...
This is temporary, until src/or is split.
Putting this in containers would be another logical alternative,
except that addresses depend on containers, and we don't like
cycles.
2018-07-05 14:51:07 -04:00
Nick Mathewson
24c0f83185
Move socks5_status.h to src/lib/net
...
There might be a better place for it in the long run, but this is
the best I can think of for now.
2018-07-05 14:48:29 -04:00
Nick Mathewson
0e4b1781f4
Move handles.h to src/lib/container
...
There might be a better place for it in the long run, but this is
the best we can think of for now.
2018-07-05 14:45:34 -04:00
Nick Mathewson
3d610363ef
Include compat_string.h in smartlist.c
...
We need this for strcasecmp on (some) Windows build environments.
Fix from Gisle Vanem.
2018-07-05 13:53:17 -04:00
Nick Mathewson
fecb8214d5
Try to use stricmp variants that MSDN actually recommends
...
Per recommendation by Gisle Vanem
2018-07-05 13:51:50 -04:00
Gabriel L. Somlo
97fad99483
Allow single DA if explicitly configured
...
When on a private network a single directory authority is explicitly
configured, allow that DA's instace of tor to pick itself as its own
DA, by having router_pick_dirserver_generic() set the PDS_ALLOW_SELF
flag when the list of potential sources contains only one element.
This would subsequently allow router_pick_trusteddirserver_impl() to
calculate is 'requreother' condition as 'false', enabling it to pick
itself as a valid DA candidate.
Fixes #25928
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2018-07-03 14:58:47 -04:00
Nick Mathewson
2878dad9db
Merge branch 'maint-0.3.4'
2018-07-03 13:31:26 -04:00
Nick Mathewson
32d9d69350
Merge remote-tracking branch 'github/bug26568_034' into maint-0.3.4
2018-07-03 13:16:37 -04:00
Nick Mathewson
df98582851
Merge remote-tracking branch 'github/ticket26626'
2018-07-03 12:52:43 -04:00
Nick Mathewson
fe8f774820
Merge branch 'bug26522'
2018-07-03 11:34:36 -04:00
rl1987
d0525c38d6
Refrain from potentially insecure usage of strncat()
2018-07-03 11:34:14 -04:00
Nick Mathewson
77e678c20d
Merge remote-tracking branch 'github/shrink_or_h_more'
2018-07-03 11:09:54 -04:00
Nick Mathewson
02a4442524
Fix up some windows compilation issues.
...
These were mostly cases where our previous macros had been casting,
and the values that we were trying to printf were not in fact
uint64_t.
2018-07-03 11:00:18 -04:00
Nick Mathewson
d5a3bb960d
Retire U64_TO_DBL and DBL_TO_U64
...
These were necessary long ago to work around a bug in VC6.
2018-07-03 10:45:43 -04:00
Nick Mathewson
9568c0ce3d
Return U64_PRINTF_ARG and U64_FORMAT
...
The standard is printf("%"PRIu64, x);
2018-07-03 10:40:59 -04:00
Nick Mathewson
52884f56d4
Replace U64_LITERAL with the standard UINT64_C
2018-07-03 10:33:50 -04:00
Nick Mathewson
cf0b07c2e5
Retire some unused (or nearly unused) macros.
2018-07-03 10:31:19 -04:00
Nick Mathewson
4638be5312
Use the standard SHRT_MAX name.
2018-07-03 10:28:10 -04:00
Nick Mathewson
c75215c23a
Clean up various things that broke with our stdint.h changes
...
Casting before printf was necessary; now it's not so smart.
We don't have SIZEOF_UINT8_T any more.
2018-07-03 10:26:06 -04:00
Nick Mathewson
e2a94dc481
Require stdint.h and inttypes.h
...
We've been silently requiring stdint.h for a while now, and nobody
has complained. Closes ticket 26626.
2018-07-03 10:25:31 -04:00
Nick Mathewson
a01b4d7f87
Merge remote-tracking branch 'rl1987/ticket26527'
2018-07-03 09:53:46 -04:00
Nick Mathewson
a4e8f94507
Merge branch 'maint-0.2.9' into maint-0.3.2
2018-07-03 09:48:03 -04:00
Nick Mathewson
4c094436c5
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-07-03 09:48:03 -04:00
Nick Mathewson
d38e474950
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-03 09:48:03 -04:00
Nick Mathewson
228d25ddf6
Merge branch 'maint-0.3.4'
2018-07-03 09:48:03 -04:00
rl1987
439b528f25
Rename sandbox_getaddrinfo() et. al.
2018-07-03 15:53:39 +03:00
rl1987
fedb3e46ec
Remove ATTR_NONNULL macro
2018-07-03 12:33:09 +03:00
Nick Mathewson
dfdf32404c
Partially revert "Use tor_addr_from_getsockname() in several places"
...
This reverts part of commit 6ed384b827
, in order to
fix bug 26568. Bugfix on 0.3.4.1-alpha.
2018-07-02 16:11:02 -04:00
Nick Mathewson
3baf3d01cb
hs_ntor_ref.py: pass only strings to subprocess.Popen
...
Recent Python3 versions seem to require this on Windows.
Fixes bug 26535; bug copied from ntor_ref.py on 0.3.1.1-alpha.
2018-07-02 14:23:26 -04:00
Nick Mathewson
fc5f8b6931
ntor_ref.py: pass only strings to subprocess.Popen
...
Recent Python3 versions seem to require this on Windows.
Fixes bug 26535; bug introduced in f4be34f70d
, which
was apparently intended itself as a Python3 workaround.
2018-07-02 14:18:41 -04:00
Nick Mathewson
bfcfeaed07
Merge branch 'mikeperry_bug26214-rebased_squashed' into maint-0.3.4
2018-07-02 13:22:07 -04:00
Nick Mathewson
c8ccd028a7
Don't redefine str(n)casecmp on windows unless they're missing
...
When we do redefine them, use inline functions instead of #define.
This fixes a latent code problem in our redefinition of these
functions, which was exposed by our refactoring: Previously, we
would #define strcasecmp after string.h was included, so nothing bad
would happen. But when we refactored, we would sometimes #define it
first, which was a problem on mingw, whose headers contain
(approximately):
inline int strcasecmp (const char *a, const char *b)
{ return _stricmp(a,b); }
Our define turned this into:
inline int _stricmp(const char *a, const char *b)
{ return _stricmp(a,b); }
And GCC would correctly infer that this function would loop forever,
rather than actually comparing anything. This caused bug 26594.
Fixes bug 26594; bug not in any released version of Tor.
2018-07-02 11:50:17 -04:00
Nick Mathewson
cb1a3674eb
File-level documentation for some of src/lib.
2018-07-01 20:22:55 -04:00
Nick Mathewson
83a4946e7b
Prune the .may_include files a bit; detect unused lines in them
2018-07-01 18:14:28 -04:00
Nick Mathewson
518ebe14dc
fixup! Extract or_options_t from or.h
2018-07-01 16:02:33 -04:00
Nick Mathewson
8d562c040f
fixup! Remove system headers from or.h
2018-07-01 15:31:18 -04:00
Nick Mathewson
6c440da926
Remove system headers from or.h
2018-07-01 15:20:37 -04:00
Nick Mathewson
13116378b1
Extract or_options_t from or.h
...
I decided to have this file included from config.h, though, since it
is used nearly everywhere.
2018-07-01 15:20:37 -04:00
Nick Mathewson
986d761510
Extract or_state_t to its own header.
...
Fewer modules needed this than I had expected.
2018-07-01 15:20:37 -04:00
Nick Mathewson
f75357ec35
Pull a couple more enums from or.h
2018-07-01 15:20:37 -04:00
Nick Mathewson
6ccd98f93e
Move ext_or_cmd_t to proto_ext_or
2018-07-01 15:20:37 -04:00
Nick Mathewson
49f88e77e5
Extract more constants from or.h
2018-07-01 15:20:37 -04:00
Nick Mathewson
f54a5cbfb6
Extract addr_policy_t into a new header.
2018-07-01 15:20:37 -04:00
Nick Mathewson
6da0311d2c
Extract various enums and tiny structs from or.h
...
These all have a logical header to go in.
2018-07-01 15:20:37 -04:00
Nick Mathewson
1743dac078
Minimize headers that include crypto_formats and x25519 stuff
2018-07-01 15:20:37 -04:00
Nick Mathewson
500826479a
Remove other needless includes include from or/*.h
2018-07-01 15:20:37 -04:00
Nick Mathewson
471104eaa5
Remove needless includes from or.h
...
or.h should really include only the minimum of stuff from or/*,
common/*, and lib/*.
2018-07-01 15:20:37 -04:00
Nick Mathewson
7a61a92870
Combine DH_BYTES and DH_KEY_LEN; put them in a lib/defs header.
2018-07-01 11:25:29 -04:00
Nick Mathewson
cf8c3abff1
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-07-01 10:22:21 -04:00
Nick Mathewson
adcd1d8b9a
Merge branch 'maint-0.3.4'
2018-07-01 10:22:21 -04:00
Nick Mathewson
9aeef05f8f
Merge remote-tracking branch 'dgoulet/bug26523_033_01' into maint-0.3.3
2018-07-01 10:22:18 -04:00
Nick Mathewson
43dc92441d
Tabify all of the .am files.
2018-07-01 09:37:28 -04:00
Nick Mathewson
028523c801
Merge branch 'maint-0.3.4'
2018-06-30 09:15:39 -04:00
Nick Mathewson
e042727cf0
Merge remote-tracking branch 'catalyst-github/bug25895_034-squashed' into maint-0.3.4
2018-06-30 09:15:34 -04:00
Nick Mathewson
57155d38a3
Merge branch 'maint-0.3.4'
2018-06-29 23:12:03 -04:00
Nick Mathewson
8093a63f95
Restor EOL@EOF in routerlist.c
2018-06-29 23:08:45 -04:00
Nick Mathewson
ce940c8c09
Add another winsock2 include, for timeval in procmon.
2018-06-29 19:17:24 -04:00
Nick Mathewson
5921b23e15
add an include to fix macos, and probably bsd too
2018-06-29 14:03:13 -04:00
Nick Mathewson
ed84dab8b4
Merge branch 'maint-0.3.1' into maint-0.3.2
2018-06-29 13:49:43 -04:00
Nick Mathewson
36c372581f
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-06-29 13:49:43 -04:00
Nick Mathewson
75a6e7e256
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-06-29 13:49:43 -04:00
Nick Mathewson
cd3f957219
Merge branch 'maint-0.3.4'
2018-06-29 13:49:43 -04:00
Nick Mathewson
a3ec89a4f8
Merge branch 'maint-0.2.9' into maint-0.3.1
2018-06-29 13:49:43 -04:00
Nick Mathewson
3c0a63c40f
Fix a memory error in test_shared_random
...
Bug not in any released Tor.
2018-06-29 13:49:02 -04:00
Nick Mathewson
d583459d58
Fix some memory errors in the recent coverity fixes.
...
Found by asan on travis :/
2018-06-29 13:48:36 -04:00
Nick Mathewson
92b4996b23
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-06-29 13:07:13 -04:00
Nick Mathewson
d3ecb3a8d6
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-06-29 13:07:13 -04:00
Nick Mathewson
1f389dadd0
Merge branch 'maint-0.3.4'
2018-06-29 13:07:13 -04:00
Nick Mathewson
6e9d5fc4ec
Merge remote-tracking branch 'ahf-github/maint-0.3.2' into maint-0.3.2
2018-06-29 13:07:07 -04:00
Nick Mathewson
7a47379f25
Merge branch 'maint-0.3.4'
2018-06-29 13:06:16 -04:00
Nick Mathewson
f82f8179e6
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-06-29 13:06:15 -04:00
Nick Mathewson
f6b30a97a9
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-06-29 13:06:15 -04:00
Nick Mathewson
68dfbd5ef4
Merge branch 'maint-0.3.1' into maint-0.3.2
2018-06-29 13:06:15 -04:00
Nick Mathewson
b89a66e997
Merge remote-tracking branch 'ahf-github/maint-0.3.0' into maint-0.3.1
2018-06-29 13:06:11 -04:00
Nick Mathewson
419077c26d
Merge remote-tracking branch 'ahf-github/maint-0.3.1' into maint-0.3.1
2018-06-29 13:06:08 -04:00
Nick Mathewson
1a5be3c5e7
Merge branch 'maint-0.3.4'
2018-06-29 13:03:00 -04:00
Nick Mathewson
5ab23e03fa
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-06-29 13:02:56 -04:00
Nick Mathewson
df896ed632
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-06-29 13:00:56 -04:00
Nick Mathewson
fe2588a5a8
Merge branch 'maint-0.3.1' into maint-0.3.2
2018-06-29 13:00:56 -04:00
Nick Mathewson
1385a5118d
Merge branch 'maint-0.2.9' into maint-0.3.1
2018-06-29 13:00:56 -04:00
Nick Mathewson
9d5b815dca
Add a missing include to timers, to make windows happier
2018-06-29 12:59:43 -04:00
Nick Mathewson
6ac64e16ed
Eliminate compat.h
2018-06-29 12:21:52 -04:00
Nick Mathewson
077176a34c
Stop using util.h and compat.h in src/trunnel/
2018-06-29 12:21:52 -04:00
Nick Mathewson
666e3e5ec6
Stop using util.h and compat.h in src/tools
2018-06-29 12:21:52 -04:00
Nick Mathewson
4212a135e1
Remove util.h and compat.h includes from src/common
2018-06-29 12:21:52 -04:00
Nick Mathewson
35e1c497aa
Combine compat.h into util.h
...
This is now just a collection of frequently-used headers.
2018-06-29 12:21:52 -04:00
Nick Mathewson
714788b195
Remove non-windows system includes from compat.h and util.h
2018-06-29 12:21:52 -04:00
Nick Mathewson
71e56c70e9
Remove windows libraries from util.h and compat.h
2018-06-29 12:21:52 -04:00
Nick Mathewson
31897a256c
Extract socks5_status_t
...
I'm not sure of the best place to put this header long-term, since
both or/*.c and tools/tor-resolve.c use it.
2018-06-29 12:21:52 -04:00
Nick Mathewson
080069c7b3
Move SIO_IDEAL_SEND_BACKLOG_QUERY into socket.h
2018-06-29 12:21:52 -04:00
Nick Mathewson
b21108f839
Remove an errant (and unused) include permission in lib/tls
2018-06-29 12:21:52 -04:00
Nick Mathewson
e269044ce0
Remove compat.c and util.c
2018-06-29 12:21:52 -04:00
Nick Mathewson
4e11c2ca6c
Extract getpass to a new lib/term library
...
(Term is short for terminal)
2018-06-29 12:21:52 -04:00
Nick Mathewson
e0957022bd
Extract get_uname to lib/osinfo.
2018-06-29 12:21:52 -04:00
Nick Mathewson
207fc4cffe
Move SUBTYPE_P into compat_compiler.h
2018-06-29 12:21:52 -04:00
Nick Mathewson
77bc65bbc4
Move bool_eq and bool_neq to lib/intmath
2018-06-29 12:21:52 -04:00
Nick Mathewson
40199b180e
Remove read_all and write_all
...
These had become wrappers around their fd and socket variants; there
were only a few users of the original functions still remaining.
2018-06-29 12:21:52 -04:00
Nick Mathewson
0362cdc169
Move fd and memory-info functions.
2018-06-29 12:21:52 -04:00
Nick Mathewson
973afcc40b
Move tor_get_avail_disk_space() to lib/fs
2018-06-29 09:43:00 -04:00
Nick Mathewson
f0319fcbde
Merge remote-tracking branch 'catalyst-github/fix-macos-includes'
2018-06-28 18:19:53 -04:00
Taylor Yu
f9e22c68a0
Fix macOS includes
...
Recent code movement from refactoring missed some includes that seem
to be necessary on macOS.
2018-06-28 17:15:53 -05:00
Nick Mathewson
365179cd16
Fix a bogus n in a comment
2018-06-28 17:21:15 -04:00
Nick Mathewson
c84ab36eff
A couple of includes to make windows compile again
2018-06-28 16:37:59 -04:00
Nick Mathewson
935ba02565
Fix paths for buffers.h; automated.
2018-06-28 16:29:35 -04:00
Nick Mathewson
d8b34e0886
Move buffers into container
...
Split the network-only and compression-only parts of buffers into
the appropriate modules.
2018-06-28 16:28:08 -04:00
Nick Mathewson
be40ad51b6
Add sys/capability.h and sys/prctl.h includes in setuid.c
2018-06-28 15:34:51 -04:00
Nick Mathewson
b67754cd64
compat_threads.c needs string.h for memset.
2018-06-28 15:20:26 -04:00
Nick Mathewson
a742a826f6
Remove all include common/ uses in crypto_ops and tls.
2018-06-28 14:40:25 -04:00
Nick Mathewson
0f02d2c041
Fix windows compilation in compat_time
...
We need to use lib/fs/winlib.h here so that we can use
GetTickCount64.
I would love to declare that XP is dead, and everybody has
GetTickCount64.
2018-06-28 13:40:21 -04:00
Nick Mathewson
7d7af19f1b
Use tor_ntohs in compress.c; avoid a winsocks dependency
2018-06-28 13:39:49 -04:00
Nick Mathewson
326c473b79
fixup! Extract time functionality into lib/wallclock and lib/time
2018-06-28 13:39:09 -04:00
Nick Mathewson
02bb701bba
Move DLL support to lib/fs
2018-06-28 13:37:51 -04:00
Nick Mathewson
8fc15e4861
Add ntohs and htons to lib/arch/bytes.h
2018-06-28 13:26:27 -04:00
Nick Mathewson
4dda026f0d
Update lib/compress to not require common/*.h
2018-06-28 13:19:58 -04:00
Nick Mathewson
3d1e99d01b
Move MIN and MAX into lib/intmath/cmp.h
2018-06-28 13:19:42 -04:00
Nick Mathewson
8736892679
Remove a pair of windows flags used nowhere in our code
2018-06-28 13:02:33 -04:00
Nick Mathewson
57f4b83852
Fix up the include path of compat_time.h (automated)
2018-06-28 13:01:54 -04:00
Nick Mathewson
a097ddb4f5
Extract time functionality into lib/wallclock and lib/time
2018-06-28 13:01:54 -04:00
Nick Mathewson
bdea94a665
Move floating-point math functions into a new lib/math
2018-06-28 12:24:45 -04:00
Nick Mathewson
6178a9f758
Move compute_num_cpus to lib/thread
2018-06-28 12:08:18 -04:00
Nick Mathewson
042df08693
Move network_init to lib/net
2018-06-28 11:59:16 -04:00
Nick Mathewson
db1a420c4e
Move tor_gethostname to lib/net
2018-06-28 11:57:01 -04:00
Nick Mathewson
8c6ff9fec2
Move tor_escape_str_for_pt_args into or/transports.c
2018-06-28 11:49:27 -04:00
Nick Mathewson
30166261bb
Move string_is_key_value to lib/encoding
2018-06-28 11:46:32 -04:00
Nick Mathewson
48ebd9bf76
Move weakrng into lib/intmath
2018-06-28 11:39:49 -04:00
Nick Mathewson
aa3edfd205
Move lockfile code into lib/fs
2018-06-28 11:33:50 -04:00