Skip to main content

Module handshake

Module handshake 

Source
Expand description

Implementations for the channel handshake

StructsΒ§

UnverifiedChannel πŸ”’
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.
UnverifiedInitiatorChannel πŸ”’
A base initiator channel on which versions have been negotiated and the relay’s handshake has been read, but where the msg::Certs has not been checked.
VerifiedChannel πŸ”’
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Β§

AuthLogAction πŸ”’
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Β§

ChannelBaseHandshake πŸ”’
Base trait that all handshake type must implement.
ChannelInitiatorHandshake πŸ”’
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).