tlsclient

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTLSClientCertsStore

func NewTLSClientCertsStore(logger *slog.Logger, src source.ClientCertsSource) (*source.ClientCertsStore, error)

Types

type RoundTripper

type RoundTripper struct {
	// contains filtered or unexported fields
}

func NewDefaultRoundTripper

func NewDefaultRoundTripper(options ...RoundTripperOption) *RoundTripper

func NewRoundTripper

func NewRoundTripper(transport *http.Transport, options ...RoundTripperOption) *RoundTripper

func (*RoundTripper) RoundTrip

func (p *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

type RoundTripperOption

type RoundTripperOption func(*RoundTripper)

func WithClientCertificate

func WithClientCertificate(clientCert *tls.Certificate) RoundTripperOption

func WithClientCertsStore

func WithClientCertsStore(source *source.ClientCertsStore) RoundTripperOption

func WithClientNextProtos

func WithClientNextProtos(nextProto []string) RoundTripperOption

func WithClientTLSConfig

func WithClientTLSConfig(tlsClientConfig *tls.Config) RoundTripperOption

func WithClientTLSSkipVerify

func WithClientTLSSkipVerify(skipVerify bool) RoundTripperOption

func WithRootCA

func WithRootCA(cert *x509.Certificate) RoundTripperOption

func WithRootCAs

func WithRootCAs(rootCAs *x509.CertPool) RoundTripperOption

func WithSystemRootCA added in v0.0.8

func WithSystemRootCA(cert *x509.Certificate) RoundTripperOption

type TLSClientConfigFunc

type TLSClientConfigFunc func() *tls.Config

func NewTLSClientConfigFunc

func NewTLSClientConfigFunc(logger *slog.Logger, src source.ClientCertsSource, opts ...TLSClientConfigOption) (TLSClientConfigFunc, error)

type TLSClientConfigOption

type TLSClientConfigOption func(*tls.Config)

func WithTLSClientNextProtos

func WithTLSClientNextProtos(nextProto []string) TLSClientConfigOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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