Documentation
¶
Overview ¶
Package https allows the implementation of TLS.
Index ¶
- func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error)
- func Listen(server *http.Server, tlsConfigPath string, logger log.Logger) error
- func Serve(l net.Listener, server *http.Server, tlsConfigPath string, logger log.Logger) error
- func Validate(tlsConfigPath string) error
- type Config
- type HTTPStruct
- type TLSStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigToTLSConfig ¶
ConfigToTLSConfig generates the golang tls.Config from the TLSStruct config.
func Listen ¶
Listen starts the server on the given address. Based on the file tlsConfigPath, TLS or basic auth could be enabled.
Types ¶
type Config ¶
type Config struct { TLSConfig TLSStruct `yaml:"tls_server_config"` HTTPConfig HTTPStruct `yaml:"http_server_config"` Users map[string]config_util.Secret `yaml:"basic_auth_users"` }
type HTTPStruct ¶
type HTTPStruct struct {
HTTP2 bool `yaml:"http2"`
}
type TLSStruct ¶
type TLSStruct struct { TLSCertPath string `yaml:"cert_file"` TLSKeyPath string `yaml:"key_file"` ClientAuth string `yaml:"client_auth_type"` ClientCAs string `yaml:"client_ca_file"` CipherSuites []cipher `yaml:"cipher_suites"` CurvePreferences []curve `yaml:"curve_preferences"` MinVersion tlsVersion `yaml:"min_version"` MaxVersion tlsVersion `yaml:"max_version"` PreferServerCipherSuites bool `yaml:"prefer_server_cipher_suites"` }
func (*TLSStruct) SetDirectory ¶ added in v0.4.0
SetDirectory joins any relative file paths with dir.
Click to show internal directories.
Click to hide internal directories.