v3helm.sh/helm/v3/internal/tlsutil Index | Files

package tlsutil

import "helm.sh/helm/v3/internal/tlsutil"

Index

Functions

func CertFromFilePair

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

CertFromFilePair returns a tls.Certificate containing the certificates public/private key pair from a pair of given PEM-encoded files. Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates

func CertPoolFromFile

func CertPoolFromFile(filename string) (*x509.CertPool, error)

CertPoolFromFile returns an x509.CertPool containing the certificates in the given PEM-encoded file. Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates

func ClientConfig

func ClientConfig(opts Options) (cfg *tls.Config, err error)

ClientConfig returns a TLS configuration for use by a Helm client.

func NewClientTLS

func NewClientTLS(certFile, keyFile, caFile string, insecureSkipTLSverify bool) (*tls.Config, error)

NewClientTLS returns tls.Config appropriate for client auth.

Types

type Options

type Options struct {
	CaCertFile string
	// If either the KeyFile or CertFile is empty, ClientConfig() will not load them.
	KeyFile  string
	CertFile string
	// Client-only options
	InsecureSkipVerify bool
}

Options represents configurable options used to create client and server TLS configurations.

Source Files

cfg.go tls.go

Version
v3.17.3 (latest)
Published
Apr 9, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
1 month ago

Tools for package owners.