Enum network::noise::handshake::HandshakeAuthMode [−][src]
pub enum HandshakeAuthMode {
Mutual {
anti_replay_timestamps: RwLock<AntiReplayTimestamps>,
trusted_peers: Arc<RwLock<PeerSet>>,
},
MaybeMutual(Arc<RwLock<PeerSet>>),
}Expand description
Noise handshake authentication mode.
Variants
In Mutual mode, both sides will authenticate each other with their
trusted_peers set. We also include replay attack mitigation in this mode.
For example, in the Diem validator network, validator peers will only allow connections from other validator peers. They will use this mode to check that inbound connections authenticate to a network public key actually contained in the current validator set.
Fields of Mutual
anti_replay_timestamps: RwLock<AntiReplayTimestamps>trusted_peers: Arc<RwLock<PeerSet>>In MaybeMutual mode, the dialer authenticates the server and the server will allow all
inbound connections from any peer but will mark connections as Trusted if the incoming
connection is apart of its trusted peers set.
Implementations
Auto Trait Implementations
impl RefUnwindSafe for HandshakeAuthMode
impl Send for HandshakeAuthMode
impl Sync for HandshakeAuthMode
impl Unpin for HandshakeAuthMode
impl UnwindSafe for HandshakeAuthMode
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self