go-libp2p-core: github.com/libp2p/go-libp2p-core/sec Index | Files | Directories

package sec

import "github.com/libp2p/go-libp2p-core/sec"

Package sec provides secure connection and transport interfaces for libp2p.

Index

Package Files

security.go

type SecureConn Uses

type SecureConn interface {
    net.Conn
    network.ConnSecurity
}

SecureConn is an authenticated, encrypted connection.

type SecureTransport Uses

type SecureTransport interface {
    // SecureInbound secures an inbound connection.
    SecureInbound(ctx context.Context, insecure net.Conn) (SecureConn, error)

    // SecureOutbound secures an outbound connection.
    SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (SecureConn, error)
}

A SecureTransport turns inbound and outbound unauthenticated, plain-text, native connections into authenticated, encrypted connections.

Directories

PathSynopsis
insecurePackage insecure provides an insecure, unencrypted implementation of the the SecureConn and SecureTransport interfaces.
insecure/pb

Package sec imports 4 packages (graph) and is imported by 18 packages. Updated 2020-09-21. Refresh now. Tools for package owners.