Commit Graph

23 Commits

Author SHA1 Message Date
Nick Mathewson b095f3325e It is an internal error if we do a TLS connection and get no cert. 2020-12-08 17:21:04 -05:00
Nick Mathewson 26a0654b05 Make RSAIdentity implement Copy. 2020-12-08 17:07:30 -05:00
Nick Mathewson 8d6087426e De-parameterize ChanMgr and everything that wraps it.
This makes a whole lot of our code simpler, and makes it so that
CircMgr and DirMgr no longer need to have anything parameterized
over transports, either.

Instead of boxing Transport inside of ChanMgr, I've made a new
Connection trait that goes from a ChanTarget* straight to a Channel.
This lets us avoid having to box the intermediate TLS object.

[*] Actually, a copy of the information from a ChanTarget. Ick, but
I had to make a copy to avoid parameterizing
Connecter::build_channel.
2020-12-08 16:29:18 -05:00
Nick Mathewson a52585d9d6 Mark some XXXX issues as XXXX-A1. 2020-12-07 16:07:59 -05:00
Nick Mathewson 01de0cafc5 Run cargo fix --edition-idioms 2020-12-02 15:14:29 -05:00
Nick Mathewson e18b4e07cb Upgrade a couple of dependencies 2020-11-28 14:17:42 -05:00
Nick Mathewson 5188263429 Refactor first-hop handling types a bit
This lets us have the notion of "get the first hop of a path as some
kind of a chantarget", which will make it easier to write other path
types.
2020-11-17 16:46:23 -05:00
Nick Mathewson 4b1ed6c39c Turn the channel "closed" method into an AtomicBool
This lets us make the test for closed channels non-async.
2020-11-13 08:34:30 -05:00
Nick Mathewson 11b257e1ae Move a few immutable fields from ChannelImpl outside the lock.
Since these don't change while the channel is alive, we don't need
the lock to protect them.
2020-11-13 08:17:36 -05:00
Nick Mathewson ac174c7666 Make the Arc-ness of channels more explicit.
Previously every channel was a secret Arc<>, which I think is bad
style, and which stopped us from using weak references in other
places.
2020-11-12 12:34:50 -05:00
Nick Mathewson 5b2e18e358 tor-chanmgr: timeout support. 2020-11-11 17:34:54 -05:00
Nick Mathewson 9504086793 Remove a couple of unused dependencies 2020-11-11 13:48:38 -05:00
Nick Mathewson 59e4b5631a Isolate async_std usage in a new tor_rtcompat crate.
Like tor_llcrypto, this crate is meant to expose only the part of
other crates (in this case, a async runtime crate) that we use.
2020-11-11 13:46:39 -05:00
Nick Mathewson dc301094fd Use anyhow in tor-circmgr and tor-chanmgr 2020-11-11 10:23:29 -05:00
Nick Mathewson af16ec18a3 update some dependencies 2020-11-11 09:14:26 -05:00
Nick Mathewson 4d24fff9c0 Upgrade dependencies 2020-11-10 12:27:10 -05:00
Nick Mathewson 9c7ed1fdde upgrade a few packages. 2020-11-05 16:56:29 -05:00
Nick Mathewson d658532f84 chanmgr: Make sure chanmgr can be shared among threads 2020-11-04 11:30:57 -05:00
Nick Mathewson 8ab8c52193 Document tor-circmgr 2020-11-02 14:11:31 -05:00
Nick Mathewson f6b5386ee7 Add missing testing.rs file 2020-10-30 16:30:44 -04:00
Nick Mathewson fbbc14d4fb Tests for tor-chanmgr. 2020-10-30 15:45:53 -04:00
Nick Mathewson 8d8ce482c9 chanmgr: don't return closing channels. 2020-10-30 09:51:52 -04:00
Nick Mathewson f399851bcf Implement a channel-manager type to get or launch channels on request. 2020-10-30 09:51:31 -04:00