tls

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BreakIntoNextProtos

func BreakIntoNextProtos(prefix, value string) ([]string, error)

BreakIntoNextProtos takes in a prefix and a value and breaks it into a chunks

func ClientConfigs added in v0.2.2

func ClientConfigs(ctx context.Context, n *types.NodeCredentials, opt ...nodeenrollment.Option) ([]*tls.Config, error)

ClientConfigs creates client-side tls.Config by from the given NodeCredentials. The values populated here can be used or modified as needed. There are two to represent using current and next as the certificate selector passed via ALPN, so dials can be attempted with either.

Supported options: WithRandomReader, WithServerName (passed through to standardTlsConfig), WithExtraAlpnProtos, WithState

func CombineFromNextProtos

func CombineFromNextProtos(prefix string, chunks []string) (string, error)

CombineFromNextProtos takes in a prefix and chunks and combines it from chunks

func GenerateServerCertificates

GenerateServerCertificates issues contemporaneous certificates for TLS connections from one or more root certificates.

Valid options: WithRandomReader, WithStorageWrapper (passed through to LoadNodeInformation and LoadRootCertificates)

func ServerConfig

ServerConfig takes in a generate response and turns it into a server-side TLS configuration

Supported options: WithServerName, which will be the value used in the cert map for lookup; also, options passed in here will be passed through to the standard TLS configuration function (useful for tests, mainly)

Types

This section is empty.

Jump to

Keyboard shortcuts

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