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

Mutual

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>>
MaybeMutual(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.

Tuple Fields of MaybeMutual

0: Arc<RwLock<PeerSet>>

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.