Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertConfig ¶ added in v1.0.0
type CertConfig interface {
// SetClientAuthType sets a client authentication type.
SetClientAuthType(authType tls.ClientAuthType)
// SetServerKey sets a SSL server key.
SetServerKey(key []byte)
// SetServerCert sets a SSL server certificate.
SetServerCert(cert []byte)
// SetRootCerts sets a SSL root certificates.
SetRootCerts(certs ...[]byte)
// SetServerKeyFile loads a SSL server key file and sets it.
SetServerKeyFile(file string) error
// SetServerCertFile loads a SSL server certificate file and sets it.
SetServerCertFile(file string) error
// SetRootCertFile loads SSL root certificate files and sets them.
SetRootCertFiles(files ...string) error
// SetTLSConfig sets a TLS configuration directly.
// If the provided configuration is nil, TLS will be disabled.
SetTLSConfig(tlsConfig *tls.Config)
// TLSConfig returns a TLS configuration from the configuration.
TLSConfig() (*tls.Config, error)
}
CertConfig represents a TLS configuration interface.
func NewCertConfig ¶ added in v1.0.0
func NewCertConfig() CertConfig
NewCertConfig returns a new TLS configuration.
type Conn ¶
type Conn interface {
ConnectionState() tls.ConnectionState
}
Conn represents a connection interface.
Click to show internal directories.
Click to hide internal directories.