eta
2f39dbd587
Merge branch 'rtcompat-refactor' into 'main'
...
Refactor the tor-rtcompat API.
Closes #301 and #300
See merge request tpo/core/arti!263
2022-01-27 15:53:35 +00:00
Nick Mathewson
9f3ad85d75
Document why {current,create}_runtime are type-erased
2022-01-27 10:31:45 -05:00
eta
c4321289f2
Apply @eta's suggestions from review on !263
...
Comment-only.
2022-01-27 15:25:57 +00:00
eta
785ad605d7
Merge branch 'coverage-tracking' into 'main'
...
Add test coverage tracking with CI/CD
Closes #250
See merge request tpo/core/arti!221
2022-01-27 12:56:22 +00:00
Arturo Marquez
899691e5c7
Install bs4 in coverage job
2022-01-26 23:48:11 -06:00
Arturo Marquez
b3ba32824e
Use `maint/with_coverage.sh` in coverage job
2022-01-26 23:13:15 -06:00
Arturo Marquez
3213b89390
Add changes in `maint`
...
Follows up on changes from https://gitlab.torproject.org/trinity-1686a/arti/-/merge_requests/2/diffs#bc2cc73a8917fa6fed183148df69119665eb4e55
2022-01-26 22:46:45 -06:00
Nick Mathewson
474a46999d
CI: Fix async-std task
...
Previously it didn't enable any TLS provider, since we made
native-tls optional a few commits ago. Now it enables rustls,
so that rustls also gets a quick check along with async-std.
I've also switched this test to use "cargo clippy" in place of
"cargo test" because it's a strict superset.
2022-01-26 15:12:39 -05:00
Nick Mathewson
5dcc821146
Fix documentation references for tor-rtcompat refactoring.
2022-01-26 14:58:28 -05:00
Nick Mathewson
9c043a648a
arti: be more careful to use the user-selected runtime
2022-01-26 14:31:49 -05:00
Nick Mathewson
bf8fa66d36
Rename `SpawnBlocking` trait to `BlockOn`.
...
This avoids a future confusion with the new `SpawnBlocking` trait in
async_executors v0.5, and better describes what the trait provides.
2022-01-26 14:06:58 -05:00
Nick Mathewson
dec2c4ee63
Make test_with_all_runtimes cover _all_ the runtimes.
...
This took some refactoring, so that I wouldn't need to define 9
different versions of the function. It also required that we change
the behavior of test_with_all_runtimes slightly, so that it asserts
on _any_ failure rather than asserting on most but returning Err()
for others. That in turn required changes to a few of its callers.
There's probably a better way to do all of this macro business, but
this is the best I could find.
2022-01-26 14:06:58 -05:00
Nick Mathewson
30b3818a9e
Make the native-tls crate optional.
...
This commit puts the native-tls crate behind a feature. The feature
is off-by-default in the tor-rtcompat crate, but can be enabled
either from arti or arti-client.
There is an included script that I used to test that tor-rtcompat
could build and run its tests with all subsets of its features.
Closes #300
2022-01-26 14:06:58 -05:00
Nick Mathewson
8af3528cd3
Define aliases for "the best enabled runtime".
...
This helps us simplify our code in a few ways, and will help even
more once native_tls is optional.
2022-01-26 14:06:58 -05:00
Nick Mathewson
6f29d485e4
Make current/create functions into runtime member functions.
...
This should help avoid some amount of temptation towards API
proliferation.
2022-01-26 14:06:58 -05:00
Nick Mathewson
2333d0466e
Rename FooRuntime to FooNativeTlsRuntime for consistency.
2022-01-26 14:06:58 -05:00
Nick Mathewson
05a04220cc
Limit the inner types in tor-rtcompat that have to implement Clone
...
If we implement our own clone on CompoundRuntime, we no longer need
Clone implementations on our TlsProvider implementations.
2022-01-26 14:06:58 -05:00
Nick Mathewson
99c59a8f2b
Remove no-longer-needed tokio runtime helper macro
2022-01-26 14:06:58 -05:00
Nick Mathewson
668364d75d
Unify TokioRuntime and TokioRuntimeHandle
...
Having separate types here doesn't justify the (very limited)
benefit of distinguishing between the case where we have created an
executor that we own and the case where we have a handle to an
already-running tokio executor.
Part of #301 .
2022-01-26 14:06:58 -05:00
Nick Mathewson
884d614a61
Remove a now-incorrect comment in tor-proto.
2022-01-26 14:06:58 -05:00
Nick Mathewson
5af8a1bf28
Remove misspellings of "rusttls".
2022-01-26 14:05:05 -05:00
eta
4aa442de1d
Merge branch 'config' into 'main'
...
doc/CONFIG-NOTES.md: config proposal
See merge request tpo/core/arti!248
2022-01-26 17:00:23 +00:00
Nick Mathewson
e145f2b600
Merge branch 'rustls_v2' into 'main'
...
tor-rtcompat: Add support for a rustls backend
Closes #86
See merge request tpo/core/arti!260
2022-01-25 20:10:58 +00:00
Nick Mathewson
e4e691a790
More comments on the limitations of tor-rtcompat's TLS API
...
Also, more comments on why these limitations are safe within the
context of Tor, but you wouldn't want to use them elsewhere.
2022-01-25 13:16:39 -05:00
Nick Mathewson
0898b485aa
Comment-only: document sni_hostname more.
...
Previously we expected the reader to automatically know why it was
called "SNI", which really isn't fair.
2022-01-25 13:16:39 -05:00
Nick Mathewson
d1d121aac6
Refactor native_tls usage into its own module
...
This change uses the async-native-tls crate for everything, and
deletes some duplicated code.
2022-01-25 13:16:39 -05:00
Nick Mathewson
8def5a0d89
tor-rtcompat: Add support for rustls.
...
This is based on @janimo's approach in !74 , but diverges in a few
important ways.
1. It assumes that something like !251 will merge, so that we can
have separate implementations for native_tls and rustls compiled
at the same time.
2. It assumes that we can implement this for the futures::io traits
only with no real penalty.
3. It uses the `x509-signature` crate to work around the pickiness of
the `webpki` crate. If webpki eventually solves their
[bug 219](https://github.com/briansmith/webpki/issues/219 ), we
can remove a lot of that workaround.
Closes #86 .
2022-01-25 13:16:39 -05:00
Nick Mathewson
979cfb46d1
Add a C program to make Tor-style X509 link certificates
...
We should never use this for anything but making the testing
certificates we use for making sure our TLS implementation works.
2022-01-24 14:22:07 -05:00
eta
b893f88c70
Merge branch 'ticket_277' into 'main'
...
More documentation about refining build process and getting help
Closes #277
See merge request tpo/core/arti!259
2022-01-24 14:15:00 +00:00
eta
a83b8c4374
Merge branch 'error-plan' into 'main'
...
Error plan
See merge request tpo/core/arti!257
2022-01-24 14:11:11 +00:00
eta
146fbbaaa8
Merge branch 'ticket255' into 'main'
...
Refactor our Runtime implementations to allow replacement parts
Closes #255
See merge request tpo/core/arti!251
2022-01-24 14:09:51 +00:00
Ian Jackson
ba591a813f
Merge branch 'conn-prefs-rename' into 'main'
...
StreamPrefs: rename from ConnectPrefs
See merge request tpo/core/arti!256
2022-01-21 17:29:57 +00:00
Ian Jackson
a79a2e87be
Rename TorClient::set_stream_prefs
...
In line with the rest of the renaming.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/256#note_2771617
2022-01-21 17:12:08 +00:00
eta
87326afe75
Error plan: typos/fixes
2022-01-21 17:00:49 +00:00
Nick Mathewson
c3f82ee14d
README,CONTRIBUTING: More links.
...
Explain how to report bugs and how get accounts on the bugtracker;
add link to the troubleshooting document.
Part of #277
2022-01-21 10:59:14 -05:00
Nick Mathewson
33e70eec3d
TROUBLESHOOTING.md: More information+links about build process.
...
Part of #277
2022-01-21 10:59:14 -05:00
Ian Jackson
dcf26466f3
StreamPrefs: Re-alphabetise imports following rename
...
Placates rustfmt
2022-01-21 11:07:21 +00:00
Ian Jackson
aa4d8de16e
StreamPrefs: rename from ConnectPrefs
...
The docs even say this is about stream.
As @nickm writes in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771289
we generally call end-to-end connections that are tunneled over Tor
"Streams" to distinguish them from everything else in the Tor
protocols that could possibly be called a "Connection".
That seems to apply here too.
2022-01-21 11:07:15 +00:00
Ian Jackson
695a33c1fd
Merge branch 'always-isolate' into 'main'
...
Provide isolate-all-streams function
Closes #279
See merge request tpo/core/arti!252
2022-01-20 19:08:05 +00:00
Ian Jackson
f0f296450a
Errors: fold in people's views so is mostly unattributed now
2022-01-20 18:28:06 +00:00
Ian Jackson
e762679a06
Errors: sort out markdown formatting
2022-01-20 18:27:52 +00:00
Ian Jackson
446d72329b
Errors: c&p raw text of consensus conclusions from pad to git
2022-01-20 18:27:31 +00:00
Nick Mathewson
c41216ce70
Merge branch 'docs-build' into 'main'
...
CONTRIBUTING: Document how to build the docs
See merge request tpo/core/arti!255
2022-01-20 18:10:24 +00:00
Ian Jackson
7bc8941742
isolation: Rename isolate_every_stream from ..._connection
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771291
2022-01-20 17:53:09 +00:00
Ian Jackson
23c1fc8c56
isolation: Rename (internal) EveryStream enum variant
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771289
2022-01-20 17:53:09 +00:00
Nick Mathewson
06c15f21b4
isolation: Much better wording for always isolate setting
2022-01-20 17:52:10 +00:00
Ian Jackson
1250fc68ce
CONTRIBUTING: Document how to build the docs
...
Eventually we may need a separate HACKING.md
2022-01-20 17:36:37 +00:00
Ian Jackson
85ed27f621
CONFIG-NOTES: finish a sentence
2022-01-20 17:28:23 +00:00
eta
6ba3686a59
CONFIG-NOTES: Suggestions from MR review
2022-01-20 17:02:35 +00:00
Nick Mathewson
b2582b29c2
Merge branch 'pathconfig_fixing' into 'main'
...
Refactor, fix, test PathConfig type
See merge request tpo/core/arti!254
2022-01-20 15:16:51 +00:00