Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientTLSConfig ¶ added in v0.3.3
func NewClientTLSConfig(xfs fs.FS, certPath, keyPath, caPath, serverName string) (clientTLSConfig *tls.Config, err error)
NewClientTLSConfig returns a TLS Config for a client connection. `caPath` can be empty, in that case, RootCAs is nil, TLS uses the host's root CA set.
func NewServerTLSConfig ¶ added in v0.3.3
func NewServerTLSConfig(xfs fs.FS, certPath, keyPath, caPath string, verifyPeer bool) (serverTLSConfig *tls.Config, err error)
NewServerTLSConfig returns a TLS Config for a server connection. when verifyPeer=true, strictly verify client certs only issued by the designated CA (caPath)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.