tlsutil

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package tlsutil contains utility functions for TLS operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientKeypair

func ClientKeypair() (string, string)

ClientKeypair returns the path to a client certificatee and key.

func DNSNames

func DNSNames(svcName, svcNamespace string) []string

DNSNames returns the cluster DNS names for the given service name and namespace.

func HeadlessDNSNames

func HeadlessDNSNames(podName, svcName, svcNamespace string) []string

HeadlessDNSNames returns the DNS names for a pod in the given headless service name and namespace.

func NewClientTLSConfig

func NewClientTLSConfig() (*tls.Config, error)

NewClientTLSConfig returns a new client TLS configuration for use with connecting to a server requiring mTLS.

func NewClientTLSConfigFromSecret

func NewClientTLSConfigFromSecret(c client.Client, name, namespace string) (*tls.Config, error)

NewClientTLSConfigFromSecret returns a client TLS config from a kubernetes certificate secret.

func NewServerTLSConfig

func NewServerTLSConfig() (*tls.Config, error)

NewServerTLSConfig returns a new server TLS configuration with client certificate verification enabled.

func ServerKeypair

func ServerKeypair() (string, string)

ServerKeypair returns the path to a server certificatee and key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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