Nick Mathewson
2f683465d4
Bump copyright date to 2019
2019-01-16 12:33:22 -05:00
Mike Perry
659a4f06d4
Circuit padding ProtoVer plumbing.
...
This helps us to determine if a middle node can pad to us or not.
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2019-01-02 15:12:16 +02:00
Nick Mathewson
ca4b86f90a
Merge remote-tracking branch 'tor-github/pr/508'
2018-12-05 08:19:02 -05:00
Nick Mathewson
31cc0d2c0b
Merge branch 'maint-0.3.5'
2018-11-15 16:11:29 -05:00
Nick Mathewson
4b6b58ed8e
Merge branch 'bug27740_035_fix' into maint-0.3.5
2018-11-15 16:11:06 -05:00
Nick Mathewson
6ca29ea409
Add libtor-buf-testing to build.rs
2018-11-14 16:07:36 -05:00
Nick Mathewson
bf4f55a13d
Merge branch 'subsystems'
2018-11-09 15:01:49 -05:00
Nick Mathewson
c8892b53ec
Merge remote-tracking branch 'tor-github/pr/466'
2018-11-06 15:35:45 -05:00
Nick Mathewson
6e7ff8cba0
Move the code that knows our tor version into a lowest-level lib
2018-11-05 09:22:02 -05:00
Nick Mathewson
97324a731f
Merge remote-tracking branch 'tor-github/pr/431' into maint-0.3.5
2018-10-30 09:35:07 -04:00
Nick Mathewson
22338d63c4
Merge remote-tracking branch 'tor-github/pr/431' into bug27740_035_fix
2018-10-30 09:33:58 -04:00
Nick Mathewson
de55df0260
remove now-unused "use" statement.
2018-10-30 09:28:10 -04:00
Nick Mathewson
262b0fe7a0
Merge remote-tracking branch 'tor-github/pr/381' into maint-0.3.5
2018-10-30 08:39:57 -04:00
Nick Mathewson
632e040659
Try to restore a proper fix for bug27740 in 0.3.5.
...
(I messed up the merge in 289a7dbac32a981897e12a3c250f0b6c67eec809.)
2018-10-30 07:37:20 -04:00
cypherpunks
bfab7b9d35
rust/tor_log: fix C_RUST_COUPLED documentation
...
This file was moved in 97b15a1d7c
and moved again in e7f5f48d68
.
2018-10-24 09:02:04 -04:00
Nick Mathewson
289a7dbac3
Merge branch 'maint-0.3.4' into maint-0.3.5
2018-10-23 19:21:44 -04:00
Nick Mathewson
7edc594ee7
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-10-23 19:18:23 -04:00
Nick Mathewson
1ae9116601
Merge remote-tracking branch 'onionk/rust-protocommas1' into maint-0.3.5
2018-10-19 14:20:57 -04:00
cypherpunks
2f0744b3e6
rust/tor_util: drop unsafe block in cstr!
...
This is unnecessary just to get an empty string, there's Default::default().
Fix on 8fff331bb0
.
2018-10-17 00:16:21 +00:00
Alex Crichton
38d644c94b
Remove rlib+staticlib configuration for Rust crates
...
Only the final crate needs to be a `staticlib`, no need for all the
intermediate steps to produce staticlibs!
2018-10-01 22:58:44 -07:00
Alex Crichton
757a2360a4
Remove [features]
from workspace Cargo.toml
...
Unfortunately Cargo doesn't actually parse these! Cargo should probably
print a warning saying they're not used...
2018-10-01 22:57:38 -07:00
Alex Crichton
74c1e44746
Fix segfaults related to sanitizers+jemalloc
...
It looks to be the case that Rust's standard allocator, jemalloc, is
incompatible with sanitizers. The incompatibility, for whatever reason,
seems to cause segfaults at runtime when jemalloc is linked with
sanitizers.
Without actually trying to figure out what's going on here this commit
instead takes the hammer of "let's remove jemalloc when testing". The
`tor_allocate` crate now by default switches to the system allocator
(eventually this will want to be the tor allocator). Most crates then
link to `tor_allocate` ot pick this up, but the `smartlist` crate had to
manually switch to the system allocator in testing and the `external`
crate had to be sure to link to `tor_allocate`.
The final gotcha here is that this patch also switches to
unconditionally passing `--target` to Cargo. For weird and arcane
reasons passing `--target` with the host target of the compiler (which
Cargo otherwise uses as the default) is different than not passing
`--target` at all. This ensure that our custom `RUSTFLAGS` with
sanitizer options doesn't make its way into build scripts, just the
final testing artifacts.
2018-10-01 22:55:59 -07:00
cypherpunks
5e74db95c2
rust: run rustfmt
2018-09-24 18:00:56 +00:00
cypherpunks
b91bc1babc
rust/protover: remove redundant ExceedsMax checks
...
This is already checked elsewhere.
2018-09-24 14:30:43 +00:00
cypherpunks
42558df7c8
rust/protover: return C-allocated string in protover_all_supported()
...
The result of CString::into_raw() is not safe to free
with free() except under finicky and fragile circumstances
that we definitely don't meet right now.
This was missed in be583a34a3
.
2018-09-21 05:16:22 +00:00
cypherpunks
db89b4b152
rust/protover: fix null deref in protover_all_supported()
...
Fortunately with the current callers it couldn't happen in practice.
Fix on d1820c1516
.
2018-09-21 04:57:26 +00:00
teor
7bf9c93ab3
Merge remote-tracking branch 'nickm/bug27741_033' into bug27741_035
...
Resolve conflicts due to rustfmt, and run rustfmt on the merged code.
2018-09-18 23:32:57 +10:00
Nick Mathewson
52191064ac
Merge branch 'maint-0.3.4'
2018-09-18 08:33:13 -04:00
Nick Mathewson
2ddbaf9cdc
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-09-18 08:31:14 -04:00
Nick Mathewson
80ad15921c
Remove extraneous argument from Rust protover_compute_vote()
...
This argument was added to match an older idea for the C api, but we
decided not to do it that way in C.
Fixes bug 27741; bugfix on 0.3.3.6 / TROVE-2018-005 fix.
2018-09-17 11:57:56 -04:00
Nick Mathewson
a8ac21fbb5
Don't try to link C from rust doctests for nss detection
...
This is really annoying, since we can't use cfg(test) for doctests.
2018-09-16 14:34:31 -04:00
Nick Mathewson
991bec67ee
When Tor is compiled with NSS, don't claim support for LinkAuth=1
...
Closes ticket 27288
2018-09-16 13:28:29 -04:00
cypherpunks
1ed5e009cb
rust/protover: reject extra commas
...
The C implementation had gotten this wrong too, in a slightly different way.
Introduced in 5af03c1ef3
.
Fixes #27197 ; bugfix on 0.3.3.3-alpha.
2018-09-15 23:19:31 +00:00
cypherpunks
5c47f725b0
rust/protover: delete ProtoSet::retain
...
As the comment noted, it was horribly inefficient.
2018-09-14 15:10:22 +00:00
cypherpunks
c613d55134
rust/protover: use .and_not_in() instead of .retain() in all_supported()
...
.retain() would allocating a Vec of billions of integers and check them
one at a time to separate the supported versions from the unsupported.
This leads to a memory DoS.
Closes ticket 27206. Bugfix on e6625113c9
.
2018-09-14 15:08:55 +00:00
cypherpunks
578f7326ed
rust/protover: add ProtoSet::and_not_in()
...
This is a way more efficient version of retain().
2018-09-14 15:08:54 +00:00
Nick Mathewson
82b1282772
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-09-14 09:25:34 -04:00
cypherpunks
bf9dc697fa
Merge branch 'rust-protokeyword1-034' into rust-protokeyword1-035
2018-09-14 02:33:59 +00:00
cypherpunks
574d59c640
Merge branch 'rust-protokeyword1' into rust-protokeyword1-034
2018-09-14 02:26:31 +00:00
cypherpunks
7c26f88fd7
rust/protover: validate unknown protocol names use only allowed characters
2018-09-13 16:33:58 +00:00
Nick Mathewson
f308e81fa7
Merge branch 'maint-0.3.4'
2018-09-12 17:25:40 -04:00
Nick Mathewson
f8d5fb42a3
Merge branch 'maint-0.3.3' into maint-0.3.4
2018-09-12 17:24:41 -04:00
cypherpunks
03c4d0ab9c
rust/protover: fix check for overlapping ranges
...
Closes ticket 27649. Bugfix on e6625113c9
.
2018-09-12 02:47:59 +00:00
cypherpunks
b88a2f28ae
rust/protover: remove version zero from tests
...
This isn't legal according to dir-spec.txt.
We can write separate tests for it if the spec
is changed to make it legal.
2018-09-12 02:47:59 +00:00
Nick Mathewson
0db5c54957
Merge branch 'nss_squashed' into nss_merge
2018-09-04 20:21:07 -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
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