Documentation ¶
Index ¶
- Constants
- Variables
- func AddCACertificateContents(caContent string) booldeprecated
- func AddCACertificateFile(caFile string) liberr.Errordeprecated
- func AddCertificateContents(keyContents, certContents string) liberr.Errordeprecated
- func AddCertificateFile(keyFile, certFile string) liberr.Errordeprecated
- func AddCertificatePairFile(keyFile, crtFile string) liberr.Errordeprecated
- func AddCertificatePairString(key, crt string) liberr.Errordeprecated
- func AddRootCAContents(rootContent string) booldeprecated
- func AddRootCAFile(rootFile string) liberr.Errordeprecated
- func AppendCertificates(cert []tls.Certificate) []tls.Certificatedeprecated
- func CheckCertificates() booldeprecated
- func GetCertificates() []tls.Certificatedeprecated
- func GetCipherKey(cipher string) uint16deprecated
- func GetClientCA() *x509.CertPooldeprecated
- func GetCurveID(curveRef string) tls.CurveIDdeprecated
- 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 StringToCipherKey(cipher string) uint16
- func StringToClientAuth(auth string) tls.ClientAuthType
- func StringToCurveID(curveRef string) tls.CurveID
- func StringToTlsVersion(tlsVersStr string) uint16
- func SystemRootCA() *x509.CertPool
- type Certif
- type Config
- type FctHttpClient
- type FctRootCA
- 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 GetCipherKey
deprecated
func GetClientCA
deprecated
func GetCurveID
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 StringToCipherKey ¶ added in v1.5.0
func StringToClientAuth ¶ added in v1.5.0
func StringToClientAuth(auth string) tls.ClientAuthType
func StringToCurveID ¶ added in v1.5.0
func StringToTlsVersion ¶ added in v1.5.0
func SystemRootCA ¶ added in v1.5.0
Types ¶
type Config ¶ added in v1.5.0
type Config 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 []Certif `mapstructure:"certPair" json:"certPair" yaml:"certPair" toml:"certPair"` CertPairFile []Certif `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 FctTLSDefault ¶ added in v1.10.0
type FctTLSDefault func() TLSConfig
type TLSConfig ¶ added in v1.5.0
type TLSConfig interface { AddRootCAString(rootCA string) bool AddRootCAFile(pemFile string) liberr.Error GetRootCA() *x509.CertPool AddClientCAString(ca string) bool AddClientCAFile(pemFile string) liberr.Error GetClientCA() *x509.CertPool AddCertificatePairString(key, crt string) liberr.Error AddCertificatePairFile(keyFile, crtFile string) liberr.Error LenCertificatePair() int CleanCertificatePair() GetCertificatePair() []tls.Certificate SetVersionMin(vers uint16) SetVersionMax(vers uint16) SetClientAuth(cAuth tls.ClientAuthType) SetCipherList(cipher []uint16) SetCurveList(curves []tls.CurveID) SetDynamicSizingDisabled(flag bool) SetSessionTicketDisabled(flag bool) Clone() TLSConfig TlsConfig(serverName string) *tls.Config }
Click to show internal directories.
Click to hide internal directories.