hs-libp2p-0.2.0.0: Haskell implementation of the libp2p networking stack
Safe HaskellNone
LanguageGHC2021

LibP2P.Security.TLS

Description

libp2p TLS 1.3 secure channel with mutual peer authentication.

Synopsis

Documentation

data TLSRole Source #

TLS endpoint role on a libp2p byte stream.

Constructors

TLSClient 
TLSServer 

Instances

Instances details
Show TLSRole Source # 
Instance details

Defined in LibP2P.Security.TLS

Eq TLSRole Source # 
Instance details

Defined in LibP2P.Security.TLS

Methods

(==) :: TLSRole -> TLSRole -> Bool #

(/=) :: TLSRole -> TLSRole -> Bool #

data TLSHandshakeResult Source #

Authenticated TLS channel and the ALPN result selected by the peer.

performTLSHandshake :: KeyPair -> TLSRole -> StreamIO -> IO TLSHandshakeResult Source #

Perform a TLS 1.3 handshake with Yamux offered for inlined negotiation.

performTLSHandshakeWithMuxers :: [ProtocolId] -> KeyPair -> TLSRole -> StreamIO -> IO TLSHandshakeResult Source #

Perform a TLS 1.3 mutual-authentication handshake, advertising the given muxers through ALPN and retaining libp2p as the required fallback.

tlsProtocolId :: ProtocolId Source #

multistream-select protocol ID for the libp2p TLS handshake.

yamuxProtocolId :: ProtocolId Source #

Yamux protocol ID, also used as its inlined TLS ALPN value.