tlsutil

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTLSConfig

func LoadTLSConfig(cfg TLSConfig) (*tls.Config, error)

LoadTLSConfig builds a *tls.Config from the YAML-friendly struct.

Types

type AutocertConfig

type AutocertConfig struct {
	Domains  []string `yaml:"domains" json:"domains"`
	CacheDir string   `yaml:"cache_dir" json:"cache_dir"`
	Email    string   `yaml:"email" json:"email"`
}

AutocertConfig holds Let's Encrypt autocert configuration.

type TLSConfig

type TLSConfig struct {
	Enabled    bool   `yaml:"enabled" json:"enabled"`
	CertFile   string `yaml:"cert_file" json:"cert_file"`
	KeyFile    string `yaml:"key_file" json:"key_file"`
	CAFile     string `yaml:"ca_file" json:"ca_file"`
	ClientAuth string `yaml:"client_auth" json:"client_auth"` // require | request | none
	SkipVerify bool   `yaml:"skip_verify" json:"skip_verify"` // for dev only
}

TLSConfig is the common TLS configuration used across all transports.

Jump to

Keyboard shortcuts

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