Documentation ¶
Index ¶
- func CipherSuitesToUint16(ciphers []string) ([]uint16, []string, error)
- func ParseClientAuthType(ClientAuth string) (tls.ClientAuthType, error)
- func ParseClientTLSConfig(serverTLSConfig *TLSConfig) (*tls.Config, []string, error)
- func ParseCurves(curveNames []string) ([]tls.CurveID, error)
- func ParseServerTLSConfig(serverTLSConfig, clientTLSConfig *TLSConfig) (*tls.Config, []string, error)
- func ParseTLSVersion(tlsVersion string) (uint16, error)
- type ClientCertificatePairs
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CipherSuitesToUint16 ¶
CipherSuitesToUint16 for a given list of ciphers returns list of corresponding ids, list of insecure ciphers if cipher is unknown, it will return an error
func ParseClientAuthType ¶
func ParseClientAuthType(ClientAuth string) (tls.ClientAuthType, error)
func ParseClientTLSConfig ¶
ParseClientTLSConfig parses TLSConfig as it should be used for HTTPS client mTLS and returns &tls.Config, list of warnings or error if parsing has failed. At this moment warnings are only about insecure ciphers
func ParseCurves ¶
ParseCurves returns list of tls.CurveIDs that can be passed to tls.Config or error if they are not supported ParseCurves also deduplicate input list
func ParseServerTLSConfig ¶
func ParseServerTLSConfig(serverTLSConfig, clientTLSConfig *TLSConfig) (*tls.Config, []string, error)
ParseServerTLSConfig parses server and client TLSConfig struct and returns &tls.Config, list of warnings or error if parsing has failed. At this moment warnings are only about insecure ciphers
func ParseTLSVersion ¶
Types ¶
type ClientCertificatePairs ¶
type TLSConfig ¶
type TLSConfig struct { CACertFiles []string `mapstructure:"caCertFiles"` CertificatePairs []ClientCertificatePairs `mapstructure:"certificatePairs"` ClientAuth string `mapstructure:"clientAuth"` ServerName string `mapstructure:"serverName"` InsecureSkipVerify bool `mapstructure:"insecureSkipVerify"` MinTLSVersion string `mapstructure:"minTLSVersion"` MaxTLSVersion string `mapstructure:"maxTLSVersion"` CipherSuites []string `mapstructure:"cipherSuites"` Curves []string `mapstructure:"curves"` }