Commit Graph

206 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Nick Mathewson
fdaa483098 Merge branch 'nss_dh_squashed' into nss_dh_squashed_merged 2018-07-31 19:56:23 -04:00
Nick Mathewson
99beed152e Make the rust tests link. 2018-07-31 19:46:00 -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
f608cc0f31 Merge remote-tracking branch 'tor-github/pr/179' 2018-07-13 18:30:17 -04:00
Nick Mathewson
f720a5a439 Fix everything that previously referred to src/or 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
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
eee86e627b Extract memarea into its own library 2018-06-28 09:25:18 -04:00
Nick Mathewson
9cf335c9a5 Extract threading code into a new library.
Note that the workqueue code does *not* go here: it is logically at
a higher level, since it needs to use libevent and the networking
stack.
2018-06-28 09:14:42 -04:00
Nick Mathewson
235ddb15a0 Move util_format into a new libtor-encoding library
libtor-encoding is about various ways to transform data to and from
character sequences.
2018-06-27 16:18:42 -04:00
Alex Xu (Hello71)
614a78ddaa Fix Rust cross compilation. 2018-06-27 14:42:06 -05:00
Nick Mathewson
2113603718 Merge branch 'sandbox_refactor' 2018-06-27 14:45:14 -04:00
Nick Mathewson
b9b05e437d Merge branch 'net_refactor' 2018-06-27 12:52:31 -04:00
Nick Mathewson
bee580ddba Move sandbox code into a new library. 2018-06-27 10:04:17 -04:00
Nick Mathewson
42b3caa6ad Move network code to libtor-net.
There are some additional changes to come: those points are marked
by XXXX.
2018-06-27 09:08:35 -04:00
Nick Mathewson
6e2b6a6685 fixup! Extract core part of smartlist code into its own library. 2018-06-26 12:18:49 -04:00
Corey Farwell
e62582e9fe Run rustfmt on 'src/rust/protover/ffi.rs'. 2018-06-25 08:03:04 -04:00
Corey Farwell
6d2e4dea10 Utilize type param in method invocation. 2018-06-24 22:45:07 -04:00
Corey Farwell
59d4505749 Utilize if..else for switching on boolean values. 2018-06-24 22:44:36 -04:00
Corey Farwell
94880b2db7 Utilize if let construct instead of explicit unwrapping. 2018-06-24 10:16:11 -04:00
Corey Farwell
7e9c37f9cb Change allocate_and_copy_string to take a &str instead of &String. 2018-06-24 08:58:26 -04:00
Nick Mathewson
b0adf2fc9b Fix up the rust build script library list. 2018-06-22 12:04:11 -04:00