Expand description
Implementations for the channel handshake
Re-exportsΒ§
use digest::Digest;πuse futures::io::AsyncRead;πuse futures::io::AsyncWrite;πuse futures::sink::SinkExt;πuse futures::stream::Stream;πuse futures::stream::StreamExt;πuse std::net::IpAddr;πuse std::sync::Arc;πuse tracing::debug;πuse tracing::instrument;πuse tracing::instrument;πuse tracing::trace;πuse safelog::MaybeSensitive;πuse tor_cell::chancell::msg::AnyChanMsg;πuse tor_cell::chancell::AnyChanCell;πuse tor_cell::chancell::ChanMsg;πuse tor_cell::chancell::msg;πuse tor_cell::restrict::RestrictedMsg;πuse tor_cell::restrict::restricted_msg;πuse tor_cert::CertType;πuse tor_checkable::TimeBound;πuse tor_checkable::TimeValidityError;πuse tor_error::internal;πuse tor_linkspec::ChanTarget;πuse tor_linkspec::ChannelMethod;πuse tor_linkspec::OwnedChanTarget;πuse tor_linkspec::OwnedChanTargetBuilder;πuse tor_linkspec::RelayIds;πuse tor_linkspec::RelayIdsBuilder;πuse tor_llcrypto as ll;πuse tor_llcrypto::pk::ValidatableSignature;πuse tor_llcrypto::pk::ed25519::Ed25519Identity;πuse tor_rtcompat::CoarseTimeProvider;πuse tor_rtcompat::Runtime;πuse tor_rtcompat::SleepProvider;πuse tor_rtcompat::StreamOps;πuse web_time_compat::SystemTime;πuse web_time_compat::SystemTimeExt;πuse crate::channel::handler::SlogDigest;πuse crate::channel::Canonicity;πuse crate::channel::ChannelFrame;πuse crate::channel::ChannelMode;πuse crate::channel::UniqId;πuse crate::memquota::ChannelAccount;πuse crate::peer::PeerInfo;πuse crate::util::skew::ClockSkew;πuse crate::Error;πuse crate::Result;π
StructsΒ§
- Unverified
Channel π - A base channel on which versions have been negotiated and the relayβs handshake has been read, but where the certs have not been checked.
- Unverified
Initiator πChannel - A base initiator channel on which versions have been negotiated and the relayβs handshake has
been read, but where the
msg::Certshas not been checked. - Verified
Channel π - A base channel on which versions have been negotiated, relayβs handshake has been read, but the client has not yet finished the handshake.
EnumsΒ§
- Auth
LogAction π - Helper: This enum is for adding semantic to the function receiving cells indicating it to either take the auth log out or leave it in place.
StaticsΒ§
- LINK_
PROTOCOLS π - A list of the link protocols that we support.
TraitsΒ§
- Channel
Base πHandshake - Base trait that all handshake type must implement.
- Channel
Initiator πHandshake - Handshake initiator base trait. All initiator handshake should implement this trait in order to enjoy the helper functions.
FunctionsΒ§
- build_
filtered_ πchan_ target - Helper: Build a OwnedChanTarget that retains only the address that was actually used.
- check_
cert_ πtimeliness - Helper: given a time-bound input, give a result reflecting its
validity at
now, and the inner object. - get_
cert π - Helper: get a cert from our Certs cell, and convert errors appropriately.
- read_
msg π - Read a message from the stream.
- unauthenticated_
clock_ πskew - Helper: Calculate a clock skew from the msg::Netinfo cell data and the time at which we sent the msg::Versions cell.
- verify_
link_ πauth_ cert - Validate the LINK_AUTH cert (CertType 6).