tlsutil

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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