tls

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package tls contains helper functions for generating Bootz server TLS configurations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogPeerTLSCertificate

func LogPeerTLSCertificate(state tls.ConnectionState) error

LogPeerTLSCertificate prints details about the peer's TLS certificate for debugging.

func TLSConfiguration

func TLSConfiguration(opts *Opts) (*tls.Config, error)

TLSConfiguration generates a TLS config for Bootz server.

Types

type Opts

type Opts struct {
	// The private key of the CA that will sign the server's TLS certificate.
	CAPrivateKey crypto.PrivateKey
	// The certificate of the CA that will be used to generate the server's TLS cert.
	CACert *x509.Certificate
	// The IP address of the server. This will be used to generate the TLS cert.
	IPAddress net.IP
	// The x509 Cert Pool of IDevID CAs. If a client present a certificate, it must be
	// signed by one of these.
	ClientCAs *x509.CertPool
	// The server cert's subject.
	ServerCertSubject *pkix.Name
}

Opts define all parameters needed to generate a Bootz server TLS config.

Jump to

Keyboard shortcuts

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