tls

package
v0.44.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package tls contains helpers to convert Kubernetes secrets to TLS certificates.

Index

Constants

View Source
const (
	ClientCertIdentifier = "certFile"
	ClientKeyIdentifier  = "keyFile"
	CACertIdentifier     = "caFile"
)

Variables

This section is empty.

Functions

func ConfigFromSecret

func ConfigFromSecret(certSecret *corev1.Secret) (*tls.Config, error)

ConfigFromSecret returns a TLS config created from the content of the secret. An error is returned if the secret does not contain a ClientCertIdentifier and ClientKeyIdentifier, or a CACertIdentifier.

func TransportFromSecret

func TransportFromSecret(certSecret *corev1.Secret) (*http.Transport, error)

TransportFromSecret returns a HTTP transport with a TLS config created from the content of the secret. An error is returned if the secret does not contain a ClientCertIdentifier and ClientKeyIdentifier, or a CACertIdentifier.

Types

This section is empty.

Jump to

Keyboard shortcuts

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