package tlsutil
import "go.etcd.io/etcd/client/pkg/v3/tlsutil"
Package tlsutil provides utility functions for handling TLS.
Index ¶
- func GetCipherSuite(s string) (uint16, bool)
- func GetCipherSuites(ss []string) ([]uint16, error)
- func GetTLSVersion(version string) (uint16, error)
- func NewCert(certfile, keyfile string, parseFunc func([]byte, []byte) (tls.Certificate, error)) (*tls.Certificate, error)
- func NewCertPool(CAFiles []string) (*x509.CertPool, error)
- type TLSVersion
Functions ¶
func GetCipherSuite ¶
GetCipherSuite returns the corresponding cipher suite, and boolean value if it is supported.
func GetCipherSuites ¶
GetCipherSuites returns list of corresponding cipher suite IDs.
func GetTLSVersion ¶
GetTLSVersion returns the corresponding tls.Version or error.
func NewCert ¶
func NewCert(certfile, keyfile string, parseFunc func([]byte, []byte) (tls.Certificate, error)) (*tls.Certificate, error)
NewCert generates TLS cert by using the given cert,key and parse function.
func NewCertPool ¶
NewCertPool creates x509 certPool with provided CA files.
Types ¶
type TLSVersion ¶
type TLSVersion string
const ( TLSVersionDefault TLSVersion = "" TLSVersion12 TLSVersion = "TLS1.2" TLSVersion13 TLSVersion = "TLS1.3" )
Constants for TLS versions.
Source Files ¶
cipher_suites.go doc.go tlsutil.go versions.go
- Version
- v3.5.18 (latest)
- Published
- Jan 24, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 5 days ago –
Tools for package owners.