tls

package
v0.4.0-el2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: GPL-3.0 Imports: 4 Imported by: 40

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicVerifier

type BasicVerifier struct {
	OnNoPeerCertificates  func()
	OnPinDeny             func()
	HasPinned             func([]*x509.Certificate) bool
	VerifyFailure         func([]*x509.Certificate, error) error
	VerifyHostnameFailure func([]*x509.Certificate, string, error) error
	AddCert               func(*x509.Certificate)
	AskPinning            func([]*x509.Certificate) error
	HasCertificates       func() bool
	NeedToCheckPins       bool
	PinningPolicy         string
}

BasicVerifier contains the shared logic for verifying TLS connections

func (*BasicVerifier) Verify

func (v *BasicVerifier) Verify(state tls.ConnectionState, conf *tls.Config, originDomain string) error

Verify implements tls.Verifier

type Conn added in v0.3.9

type Conn interface {
	net.Conn

	Handshake() error
	ConnectionState() gotls.ConnectionState
}

Conn represents a TLS interface

func Real added in v0.3.9

func Real(c net.Conn, conf *gotls.Config) Conn

Real is a function to get a real Golang TLS connection

type Factory added in v0.3.9

type Factory func(net.Conn, *gotls.Config) Conn

Factory represents a function that can create a new TLS connection

type Verifier

type Verifier interface {
	Verify(tls.ConnectionState, *tls.Config, string) error
}

Verifier represents something that can verify a TLS connection

Jump to

Keyboard shortcuts

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