transportsecurity

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package transportsecurity provides reloadable mutual TLS for HTTP connections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

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

Source reads tls.crt, tls.key, and ca.crt from one directory revision.

func NewSource

func NewSource(directory, peerName string) (*Source, error)

NewSource validates the initial revision. peerName is the required peer DNS SAN.

func (*Source) ServerConfig

func (s *Source) ServerConfig() *tls.Config

ServerConfig permits anonymous probes; authenticated handlers must call VerifyClient.

func (*Source) VerifyClient

func (s *Source) VerifyClient(state *tls.ConnectionState) error

VerifyClient checks current trust and identity even on an existing connection.

type Transport

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

Transport replaces connection pools when identity or active trust changes.

func NewTransport

func NewTransport(source *Source, base *http.Transport) *Transport

NewTransport copies base; callers retain ownership of the original transport.

func (*Transport) CloseIdleConnections

func (t *Transport) CloseIdleConnections()

CloseIdleConnections closes the active pool without changing trust.

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(request *http.Request) (*http.Response, error)

Directories

Path Synopsis
Package issuance creates identities and bounded CA transition certificates.
Package issuance creates identities and bounded CA transition certificates.
Package tlstest creates temporary certificate revisions for transport tests.
Package tlstest creates temporary certificate revisions for transport tests.

Jump to

Keyboard shortcuts

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