tlsutil

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTLSConfig

func BuildTLSConfig(scheme string, skipVerify bool, cert *tls.Certificate, pool *x509.CertPool) (*tls.Config, error)

BuildTLSConfig creates a *tls.Config based on the encryption scheme. For "off", it returns nil. For "mtls", a certificate is required.

func LoadCertPool

func LoadCertPool(caCertFile string) (*x509.CertPool, error)

LoadCertPool loads a certificate pool from the given CA cert file. If the file is empty, it returns nil.

func LoadCertificate

func LoadCertificate(certFile, keyFile string) (*tls.Certificate, error)

LoadCertificate loads a TLS certificate from the given cert and key files. If both are empty, it returns nil. If only one is provided, it returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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