pub enum RemoteIdentity<C> {
    Unknown,
    StaticDhKey(PublicKey<C>),
    IdentityKey(PublicKey),
}
👎Deprecated: This type will be made private in the future. Use libp2p_noise::Config::new instead to use the noise protocol.
Expand description

The identity of the remote established during a handshake.

Variants§

§

Unknown

👎Deprecated: This type will be made private in the future. Use libp2p_noise::Config::new instead to use the noise protocol.

The remote provided no identifying information.

The identity of the remote is unknown and must be obtained through a different, out-of-band channel.

§

StaticDhKey(PublicKey<C>)

👎Deprecated: This type will be made private in the future. Use libp2p_noise::Config::new instead to use the noise protocol.

The remote provided a static DH public key.

The static DH public key is authentic in the sense that a successful handshake implies that the remote possesses a corresponding secret key.

Note: To rule out active attacks like a MITM, trust in the public key must still be established, e.g. by comparing the key against an expected or otherwise known public key.

§

IdentityKey(PublicKey)

👎Deprecated: This type will be made private in the future. Use libp2p_noise::Config::new instead to use the noise protocol.

The remote provided a public identity key in addition to a static DH public key and the latter is authentic w.r.t. the former.

Note: To rule out active attacks like a MITM, trust in the public key must still be established, e.g. by comparing the key against an expected or otherwise known public key.

Auto Trait Implementations§

§

impl<C> RefUnwindSafe for RemoteIdentity<C>where C: RefUnwindSafe,

§

impl<C> Send for RemoteIdentity<C>where C: Send,

§

impl<C> Sync for RemoteIdentity<C>where C: Sync,

§

impl<C> Unpin for RemoteIdentity<C>where C: Unpin,

§

impl<C> UnwindSafe for RemoteIdentity<C>where C: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V