Documentation ¶
Index ¶
- Variables
- func NewCertificate(certFile, keyFile string, commonName string, lifetimeDays int) (tls.Certificate, error)
- func NewCertificateInMemory(commonName string, lifetimeDays int) (tls.Certificate, error)
- func SecureDefaultTLS13() *tls.Config
- func SecureDefaultWithTLS12() *tls.Config
- type DowngradingListener
- type UnionedConnection
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrIdentificationFailed = errors.New("failed to identify socket type")
)
Functions ¶
func NewCertificate ¶
func NewCertificate(certFile, keyFile string, commonName string, lifetimeDays int) (tls.Certificate, error)
NewCertificate generates and returns a new TLS certificate, saved to the given PEM files.
func NewCertificateInMemory ¶ added in v1.18.5
func NewCertificateInMemory(commonName string, lifetimeDays int) (tls.Certificate, error)
NewCertificateInMemory generates and returns a new TLS certificate, kept only in memory.
func SecureDefaultTLS13 ¶ added in v1.17.0
SecureDefault returns a tls.Config with reasonable, secure defaults set. This variant allows only TLS 1.3.
func SecureDefaultWithTLS12 ¶ added in v1.17.0
SecureDefaultWithTLS12 returns a tls.Config with reasonable, secure defaults set. This variant allows TLS 1.2.
Types ¶
type DowngradingListener ¶
func (*DowngradingListener) AcceptNoWrapTLS ¶
func (l *DowngradingListener) AcceptNoWrapTLS() (net.Conn, bool, error)
type UnionedConnection ¶
Click to show internal directories.
Click to hide internal directories.