Age | Commit message (Collapse) | Author |
|
By binding the protover numbering to specific padding machines, we can make
our padding negotiation simpler. We probably should have done this in the
first place.
This has the side effect that earlier 0.4.1.x-alpha clients won't negotiate
with 0.4.1.x-stable relays, and 0.4.1.x-stable clients won't negotiate with
earlier 0.4.1.x-alpha relays (or 0.4.0.x relays). Since we don't support
alphas after the stable is released, this is fine, so long as it gets in
before the first stable of 0.4.1.x.
|
|
See proposal 289 section 4.3 for more details.
It describes the flow control protocol at the circuit and stream level. If
there is no FlowCtrl protocol version, tor supports the unauthenticated flow
control features from its supported Relay protocols.
At this commit, relay will start advertising FlowCtrl=1 meaning they support
authenticated SENDMEs v1.
Closes #30363
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
This commit also explicitly set the value of the PRT enum so we can match/pin
the C enum values to the Rust one in protover/ffi.rs.
Fixes #29631
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
This helps us to determine if a middle node can pad to us or not.
Co-authored-by: George Kadianakis <desnacked@riseup.net>
|
|
|
|
|
|
|
|
|
|
|
|
(I messed up the merge in 289a7dbac32a981897e12a3c250f0b6c67eec809.)
|
|
|
|
|
|
|
|
Only the final crate needs to be a `staticlib`, no need for all the
intermediate steps to produce staticlibs!
|
|
|
|
This is already checked elsewhere.
|
|
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 be583a34a3815c2c10e86094ab0610e4b7f9c869.
|
|
Fortunately with the current callers it couldn't happen in practice.
Fix on d1820c1516a31a149fc51a9e5126bf899e4c4e08.
|
|
Resolve conflicts due to rustfmt, and run rustfmt on the merged code.
|
|
|
|
|
|
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.
|
|
This is really annoying, since we can't use cfg(test) for doctests.
|
|
Closes ticket 27288
|
|
The C implementation had gotten this wrong too, in a slightly different way.
Introduced in 5af03c1ef3c4718b79abb1638f5a8c275129530a.
Fixes #27197; bugfix on 0.3.3.3-alpha.
|
|
As the comment noted, it was horribly inefficient.
|
|
.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 e6625113c98c281b0a649598d7daa347c28915e9.
|
|
This is a way more efficient version of retain().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Closes ticket 27649. Bugfix on e6625113c98c281b0a649598d7daa347c28915e9.
|
|
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.
|
|
|
|
|
|
|
|
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 9925d2e68709aa7346f4c5bc98ea1349df6741f3.
Fixes #27177. Bugfix on 0.3.3.5-rc.
|
|
|
|
|
|
It was parsing "1-2-3" as if it were 1-2, ignoring the 2nd hyphen
and everything after.
Introduced in d1820c1516a31a149fc51a9e5126bf899e4c4e08.
Fixes #27164; bugfix on 0.3.3.1-alpha.
|
|
This got shuffled around in b786b146edd33b025774819f54d7bba3d07bf832
and hasn't been accurate since 124caf28e6db1e7bf8cdfef25c55760c81fb91b5.
|
|
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 701c2b69f52cb4db46aa7455904e518b35fafc1a
|
|
Texxt was copied from a function that returned a single
tuple in 88b2f170e451567a3b0095a420544a675a5826b0.
|
|
|
|
Fix typo from fe66d06a45a4714141eba992fe87ec3dd5fa1c22.
The exclamation point is what lets an attribute apply to
an entire crate, without the ! it's practically a placebo.
Fix on commits af182d4ab51d6a1a70559bbdcd4ab842aa855684 and
b6059297d7cb76f0e00e2098e38d6677d3033340, and note there are
still missing docs in both crypto and protover, for now.
https://doc.rust-lang.org/reference/attributes.html
|
|
|