ssl_util

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeoutSeconds = 10

Functions

func AppendKubernetesCertsToPool added in v2.4.1

func AppendKubernetesCertsToPool(pool *x509.CertPool) error

AppendKubernetesCertsToPool appends the kubernetes certificates on disk (in the pod) to the supplied cert pool.

func CertExpiry

func CertExpiry(host, port, days string, overrideTLS bool) (bool, bool, error)

CertExpiry returns bool values indicating if the cert on a given host and port are currently exiring or if the expiration is the specified number of days away, and any errors

func CreatePool added in v2.4.1

func CreatePool() (*x509.CertPool, error)

CreatePool creates a cert pool depending on if a Kubernetes CA is found or a custom CA cert is mounted at /etc/ssl/selfsign/certificate.crt

func FetchKubernetesSelfSignedCertFromDisk added in v2.4.1

func FetchKubernetesSelfSignedCertFromDisk() ([]byte, error)

FetchKubernetesSelfSignedCertFromDisk fetches the kubernetes self-signed cert placed on disk within pods as an *x509.Certificate.

func KubernetesCAPresent added in v2.4.1

func KubernetesCAPresent() bool

kubernetesCAPresent returns 'true' if the included Kubernetes CA is available

func SSLHandshake added in v2.4.1

func SSLHandshake(siteURL *url.URL) error

SSLHandshake does an https handshake and returns any errors encountered

func SSLHandshakeWithCertPool added in v2.4.1

func SSLHandshakeWithCertPool(url *url.URL, certPool *x509.CertPool) error

SSLHandshakeWithCertPool does an SSL handshake with the spciefied cert pool instead of the default system certificate pool

func SelfSignedCAPresent added in v2.4.1

func SelfSignedCAPresent() bool

SelfSignedCAPresent determines if the user has uploaded a custom CA to use for certificate validation

Types

This section is empty.

Jump to

Keyboard shortcuts

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