summaryrefslogtreecommitdiff
path: root/crates/tor-rtcompat/src/impls
Commit message (Collapse)AuthorAgeFilesLines
* Add a note about CryptoProvicder.Nick Mathewson2024-04-221-0/+4
|
* Upgrade to futures-rustls 0.26.0, rustls 0.23.5.Nick Mathewson2024-04-221-0/+14
| | | | | | | | | The rustls upgrade will solve #1377 and CVE-2024-32650. Note that we've had to patch our RustlsProvider impl a bit in order to keep the tests passing. See comments. Closes #1377.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* rtcompat: Fix a rustdoc link.Nick Mathewson2024-01-301-1/+1
|
* Upgrade to futures-rustls and rustls 0.22.Nick Mathewson2024-01-251-25/+32
| | | | | | | The futures-rustls crate has supplanted the async-rustls crate, and it requires/embeds rustls 0.22. Closes #1179.
* clippy: consequential rustfmtIan Jackson2024-01-021-3/+1
|
* clippy: Use infallible callsIan Jackson2024-01-021-2/+1
| | | | Resolves clippy complaints about needless fallible conversions.
* clippy: Replace many calls to .get(0) with .first()Ian Jackson2024-01-021-1/+1
| | | | | FTR I don't think agree with clippy on this question, but then I often don't.
* tor-rtcompat: use track-caller for thin wrappersJim Newsome2023-12-181-0/+2
| | | | | | | | | | | | | | In particular, when the (unstable) tokio tracing feature is enabled, every tracing line includes the name of where the current task was created. Without this change, that ends up being the name of intermediate trait methods like TokioRuntimeHandle::block_on, which is not very helpful. Adding the `track_caller` attribute causes the name of the caller of these methods to be used instead, which is typically more helpful. IIUC this change is not breaking in terms of semver https://rustc-dev-guide.rust-lang.org/backend/implicit-caller-location.html.
* Upgrade async_executors dependency to 0.7.0Nick Mathewson2023-09-281-4/+3
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* update rustls to 0.21trinity-1686a2023-05-081-16/+11
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+9
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* fix deprecation warnings from rustlstrinity-1686a2022-11-261-9/+7
|
* upgrade rustls to 0.20, ignoring all deprecation warningstrinity-1686a2022-11-261-36/+30
|
* fix doc-feature synchrotrinity-1686a2022-10-162-2/+8
|
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-242-0/+2
|
* tor-rtcompat: Require that TcpStream be SendIan Jackson2022-08-151-1/+1
| | | | The lack of this seems to have been an oversight.
* rt-compat: Make all the individual runtime traits Clone+Send etc.Ian Jackson2022-06-082-1/+2
| | | | | | | | This will make it much more convenient for code that only wants one of these traits (or a subset of them). This is a good thing to support because it will allow us to use a ZST in places that do not need an actual async runtime handle (typically, the runtime handle is needed only for spawn).
* UdpSocket: remove support for connect().Nick Mathewson2022-03-182-40/+6
| | | | | | | | Currently, Arti doesn't need this. But once it does, it will be way better to have a separate type for connected sockets, rather than having to error-check every time somebody gives us a socket. Part of #410
* add simple unit test on UDPtrinity-1686a2022-03-142-0/+8
|
* add skeleton for DNS handlingtrinity-1686a2022-03-142-4/+4
|
* add udp to runtimetrinity-1686a2022-03-142-2/+99
|
* Replace manual Default, and abolish new, in tor-rtcompatIan Jackson2022-03-021-13/+1
| | | | The Default impl was the only call site for new()
* tor-rtcompat: Provide TLS wrapping for all streamsIan Jackson2022-02-242-17/+9
| | | | | | | | Now all of the runtime types we provide all impl<S> TlsProvider<S> where S: ... rather than merely TlsProvider<Self::TcpStream>. And we document and intent to perhaps require this in the future.
* tor-rtcompat: remove some unused code.Nick Mathewson2022-01-271-16/+0
| | | | | Nothing actually used these accessor functions, and it's not clear what would. We can add them later if they're needed.
* tor-rtcompat: Add some miscellaneous testsNick Mathewson2022-01-271-0/+1
| | | | | These probably aren't for things that will fail IRL, but it's nice to have coverage on the code, just in case.
* Rename `SpawnBlocking` trait to `BlockOn`.Nick Mathewson2022-01-262-2/+2
| | | | | This avoids a future confusion with the new `SpawnBlocking` trait in async_executors v0.5, and better describes what the trait provides.
* Make the native-tls crate optional.Nick Mathewson2022-01-261-0/+1
| | | | | | | | | | | 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
* Limit the inner types in tor-rtcompat that have to implement CloneNick Mathewson2022-01-262-32/+0
| | | | | If we implement our own clone on CompoundRuntime, we no longer need Clone implementations on our TlsProvider implementations.
* Remove no-longer-needed tokio runtime helper macroNick Mathewson2022-01-261-27/+18
|
* Unify TokioRuntime and TokioRuntimeHandleNick Mathewson2022-01-261-7/+25
| | | | | | | | | 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.
* More comments on the limitations of tor-rtcompat's TLS APINick Mathewson2022-01-251-0/+3
| | | | | Also, more comments on why these limitations are safe within the context of Tor, but you wouldn't want to use them elsewhere.
* Refactor native_tls usage into its own moduleNick Mathewson2022-01-253-215/+115
| | | | | This change uses the async-native-tls crate for everything, and deletes some duplicated code.
* tor-rtcompat: Add support for rustls.Nick Mathewson2022-01-252-1/+291
| | | | | | | | | | | | | | | | | | | 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.
* Refactor Runtimes to use separate TLS implementations internally.Nick Mathewson2022-01-192-24/+39
| | | | | This will make it easier to implement them using some other TLS provider as well, without having to duplicate all of our code.
* Make TlsConnector wrap TCP connections, not create its owneta2021-12-072-14/+27
| | | | | | | | | | | | | | | | | | | | `tor-rtcompat`'s `TlsConnector` trait previously included a method to create a TLS-over-TCP connection, which implied creating a TCP stream inside that method. This commit changes that, and makes the function wrap a TCP stream, as returned from the runtime's `TcpProvider` trait implementation, instead. This means you can actually override `TcpProvider` and have it apply to *all* connections Arti makes, which is useful for issues like arti#235 and other cases where you want to have a custom TCP stream implementation. This required updating the mock TCP/TLS types in `tor-rtmock` slightly; due to the change in API, we now store whether a `LocalStream` should actually be a TLS stream inside the stream itself, and check this property on reads/writes in order to detect misuse. The fake TLS wrapper checks this property and removes it in order to "wrap" the stream, making reads and writes work again.
* Resolve roughly half of the XXXXs.Nick Mathewson2021-12-061-1/+3
| | | | | | | | We want to only use TODO in the codebase for non-blockers, and open tickets for anything that is a bigger blocker than a TODO. These XXXXs seem like definite non-blockers to me. Part of arti#231.
* Document every macro.Nick Mathewson2021-09-071-0/+3
| | | | | (The nightly version of clippy now includes macros for its missing_docs_in_private_items lint.)
* Fix typosJani Monoses2021-09-071-1/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-272-0/+544
This will cause some pain for now, but now is really the best time to do this kind of thing.