security

package
v0.0.0-...-ebb1a70 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApprovePair

func ApprovePair(device string) bool

func AwaitingPair

func AwaitingPair() []string

func DecodePem

func DecodePem(cert []byte) (*x509.Certificate, error)

func DenyPair

func DenyPair(device string)

func EncodePem

func EncodePem(cert x509.Certificate) []byte

func GetConfig

func GetConfig() *tls.Config

func RequestPairApproval

func RequestPairApproval(device string) <-chan bool

func Upgrade

func Upgrade(ctx context.Context, conn net.Conn, name string) (*tls.Conn, error)

Types

type DeviceStore

type DeviceStore interface {
	Add(device string, cert *x509.Certificate)
	Remove(device string)
	Get(device string) *x509.Certificate
}
var (

	// An implementation of DeviceStore using the XDG_DATA_HOME for storage
	Devices DeviceStore = fileStore{}
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL