Documentation ¶
Index ¶
- func BreakIntoNextProtos(prefix, value string) ([]string, error)
- func ClientConfigs(ctx context.Context, n *types.NodeCredentials, opt ...nodeenrollment.Option) ([]*tls.Config, error)
- func CombineFromNextProtos(prefix string, chunks []string) (string, error)
- func GenerateServerCertificates(ctx context.Context, storage nodeenrollment.Storage, ...) (*types.GenerateServerCertificatesResponse, error)
- func ServerConfig(ctx context.Context, in *types.GenerateServerCertificatesResponse, ...) (*tls.Config, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreakIntoNextProtos ¶
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 ¶
CombineFromNextProtos takes in a prefix and chunks and combines it from chunks
func GenerateServerCertificates ¶
func GenerateServerCertificates( ctx context.Context, storage nodeenrollment.Storage, req *types.GenerateServerCertificatesRequest, opt ...nodeenrollment.Option, ) (*types.GenerateServerCertificatesResponse, error)
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 ¶
func ServerConfig( ctx context.Context, in *types.GenerateServerCertificatesResponse, opt ...nodeenrollment.Option, ) (*tls.Config, error)
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.