Help us shape the future of Go! Take the 2026 Go Developer Survey

tls

package
v1.44.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCertificateDuration = 825 * 24 * time.Hour

Variables

This section is empty.

Functions

func MakeCA

func MakeCA(signerName string) (*crypto.CA, error)

func ParseClientAuthType added in v1.43.0

func ParseClientAuthType(value string) (tls.ClientAuthType, error)

ParseClientAuthType parses a client auth type string and returns the corresponding tls.ClientAuthType. Accepts: RequireAndVerifyClientCert (default), RequireAnyClientCert, VerifyClientCertIfGiven, NoClientCert.

func ParseTLSVersion added in v1.43.0

func ParseTLSVersion(version string) (uint16, error)

ParseTLSVersion parses a TLS version string and returns the corresponding tls version constant. Accepts: "1.2", "1.3", or empty string (defaults to "1.2").

func SetClientAuth

func SetClientAuth(x *x509.Certificate) error

func SetServerAuth

func SetServerAuth(x *x509.Certificate) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL