Documentation
¶
Index ¶
- Constants
- Variables
- func AddCACertificateContents(caContent string) booldeprecated
- func AddCACertificateFile(caFile string) errordeprecated
- func AddCertificateContents(keyContents, certContents string) errordeprecated
- func AddCertificateFile(keyFile, certFile string) errordeprecated
- func AddCertificatePairFile(keyFile, crtFile string) errordeprecated
- func AddCertificatePairString(key, crt string) errordeprecated
- func AddRootCAContents(rootContent string) booldeprecated
- func AddRootCAFile(rootFile string) errordeprecated
- func AppendCertificates(cert []tls.Certificate) []tls.Certificatedeprecated
- func CheckCertificates() booldeprecated
- func GetCertificates() []tls.Certificatedeprecated
- func GetClientCA() *x509.CertPooldeprecated
- func GetRootCA() *x509.CertPooldeprecated
- func GetTLSConfig(serverName string) *tls.Configdeprecated
- func GetTlsConfigCertificates() *tls.Configdeprecated
- func SetCipherList(cipher []uint16)deprecated
- func SetClientAuth(auth string)deprecated
- func SetCurve(curves []tls.CurveID)deprecated
- func SetDynamicSizing(enable bool)deprecated
- func SetSessionTicket(enable bool)deprecated
- func SetVersionMax(vers uint16)deprecated
- func SetVersionMin(vers uint16)deprecated
- func SystemRootCA() *x509.CertPool
- type CertifOld
- type Config
- type ConfigOld
- type FctHttpClient
- type FctRootCA
- type FctRootCACert
- type FctTLSDefault
- type TLSConfig
Constants ¶
View Source
const ( ErrorParamEmpty liberr.CodeError = iota + liberr.MinPkgCertificate ErrorFileStat ErrorFileRead ErrorFileEmpty ErrorCertAppend ErrorCertKeyPairLoad ErrorCertKeyPairParse ErrorValidatorError )
Variables ¶
View Source
var Default = New()
Functions ¶
func AddCACertificateContents
deprecated
func AddCACertificateFile
deprecated
func AddCertificateContents
deprecated
func AddCertificateFile
deprecated
func AddCertificatePairFile
deprecated
added in
v1.5.0
func AddCertificatePairString
deprecated
added in
v1.5.0
func AddRootCAContents
deprecated
func AddRootCAFile
deprecated
func AppendCertificates
deprecated
func AppendCertificates(cert []tls.Certificate) []tls.Certificate
Deprecated: use local config and no more globals default config.
func CheckCertificates
deprecated
func CheckCertificates() bool
Deprecated: use local config and no more globals default config.
func GetCertificates
deprecated
func GetCertificates() []tls.Certificate
Deprecated: use local config and no more globals default config.
func GetClientCA
deprecated
func GetTLSConfig
deprecated
func GetTlsConfigCertificates
deprecated
func SetCipherList
deprecated
func SetCipherList(cipher []uint16)
Deprecated: use local config and no more globals default config.
func SetClientAuth
deprecated
func SetClientAuth(auth string)
Deprecated: use local config and no more globals default config.
func SetDynamicSizing
deprecated
func SetDynamicSizing(enable bool)
Deprecated: use local config and no more globals default config.
func SetSessionTicket
deprecated
func SetSessionTicket(enable bool)
Deprecated: use local config and no more globals default config.
func SetVersionMax
deprecated
func SetVersionMax(vers uint16)
Deprecated: use local config and no more globals default config.
func SetVersionMin
deprecated
func SetVersionMin(vers uint16)
Deprecated: use local config and no more globals default config.
func SystemRootCA ¶ added in v1.5.0
Types ¶
type Config ¶ added in v1.5.0
type Config struct { CurveList []tlscrv.Curves `mapstructure:"curveList" json:"curveList" yaml:"curveList" toml:"curveList"` CipherList []tlscpr.Cipher `mapstructure:"cipherList" json:"cipherList" yaml:"cipherList" toml:"cipherList"` RootCA []tlscas.Cert `mapstructure:"rootCA" json:"rootCA" yaml:"rootCA" toml:"rootCA"` ClientCA []tlscas.Cert `mapstructure:"clientCA" json:"clientCA" yaml:"clientCA" toml:"clientCA"` Certs []tlscrt.Certif `mapstructure:"certs" json:"certs" yaml:"certs" toml:"certs"` VersionMin tlsvrs.Version `mapstructure:"versionMin" json:"versionMin" yaml:"versionMin" toml:"versionMin"` VersionMax tlsvrs.Version `mapstructure:"versionMax" json:"versionMax" yaml:"versionMax" toml:"versionMax"` AuthClient tlsaut.ClientAuth `mapstructure:"authClient" json:"authClient" yaml:"authClient" toml:"authClient"` InheritDefault bool `mapstructure:"inheritDefault" json:"inheritDefault" yaml:"inheritDefault" toml:"inheritDefault"` DynamicSizingDisable bool `mapstructure:"dynamicSizingDisable" json:"dynamicSizingDisable" yaml:"dynamicSizingDisable" toml:"dynamicSizingDisable"` SessionTicketDisable bool `mapstructure:"sessionTicketDisable" json:"sessionTicketDisable" yaml:"sessionTicketDisable" toml:"sessionTicketDisable"` }
type ConfigOld ¶ added in v1.17.0
type ConfigOld struct { CurveList []string `mapstructure:"curveList" json:"curveList" yaml:"curveList" toml:"curveList"` CipherList []string `mapstructure:"cipherList" json:"cipherList" yaml:"cipherList" toml:"cipherList"` RootCAString []string `mapstructure:"rootCA" json:"rootCA" yaml:"rootCA" toml:"rootCA"` RootCAFile []string `mapstructure:"rootCAFiles" json:"rootCAFiles" yaml:"rootCAFiles" toml:"rootCAFiles"` ClientCAString []string `mapstructure:"clientCA" json:"clientCA" yaml:"clientCA" toml:"clientCA"` ClientCAFiles []string `mapstructure:"clientCAFiles" json:"clientCAFiles" yaml:"clientCAFiles" toml:"clientCAFiles"` CertPairString []CertifOld `mapstructure:"certPair" json:"certPair" yaml:"certPair" toml:"certPair"` CertPairFile []CertifOld `mapstructure:"certPairFiles" json:"certPairFiles" yaml:"certPairFiles" toml:"certPairFiles"` VersionMin string `mapstructure:"versionMin" json:"versionMin" yaml:"versionMin" toml:"versionMin"` VersionMax string `mapstructure:"versionMax" json:"versionMax" yaml:"versionMax" toml:"versionMax"` AuthClient string `mapstructure:"authClient" json:"authClient" yaml:"authClient" toml:"authClient"` InheritDefault bool `mapstructure:"inheritDefault" json:"inheritDefault" yaml:"inheritDefault" toml:"inheritDefault"` DynamicSizingDisable bool `mapstructure:"dynamicSizingDisable" json:"dynamicSizingDisable" yaml:"dynamicSizingDisable" toml:"dynamicSizingDisable"` SessionTicketDisable bool `mapstructure:"sessionTicketDisable" json:"sessionTicketDisable" yaml:"sessionTicketDisable" toml:"sessionTicketDisable"` }
type FctHttpClient ¶ added in v1.10.0
type FctRootCACert ¶ added in v1.17.0
type FctTLSDefault ¶ added in v1.10.0
type FctTLSDefault func() TLSConfig
type TLSConfig ¶ added in v1.5.0
type TLSConfig interface { RegisterRand(rand io.Reader) AddRootCA(rootCA tlscas.Cert) bool AddRootCAString(rootCA string) bool AddRootCAFile(pemFile string) error GetRootCA() []tlscas.Cert GetRootCAPool() *x509.CertPool AddClientCAString(ca string) bool AddClientCAFile(pemFile string) error GetClientCA() []tlscas.Cert GetClientCAPool() *x509.CertPool SetClientAuth(a tlsaut.ClientAuth) AddCertificatePairString(key, crt string) error AddCertificatePairFile(keyFile, crtFile string) error LenCertificatePair() int CleanCertificatePair() GetCertificatePair() []tls.Certificate SetVersionMin(v tlsvrs.Version) GetVersionMin() tlsvrs.Version SetVersionMax(v tlsvrs.Version) GetVersionMax() tlsvrs.Version SetCipherList(c []tlscpr.Cipher) AddCiphers(c ...tlscpr.Cipher) GetCiphers() []tlscpr.Cipher SetCurveList(c []tlscrv.Curves) AddCurves(c ...tlscrv.Curves) GetCurves() []tlscrv.Curves SetDynamicSizingDisabled(flag bool) SetSessionTicketDisabled(flag bool) Clone() TLSConfig TLS(serverName string) *tls.Config TlsConfig(serverName string) *tls.Config Config() *Config }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.