ssl

package
v0.0.0-...-0677d28 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCertAuth

func AddCertAuth(name string, ca []byte, fs file.Filesystem) (*ingress.SSLCert, error)

AddCertAuth creates a .pem file with the specified CAs to be used in Cert Authentication If it's already exists, it's clobbered.

func AddOrUpdateCertAndKey

func AddOrUpdateCertAndKey(name string, cert, key, ca []byte,
	fs file.Filesystem) (*ingress.SSLCert, error)

AddOrUpdateCertAndKey creates a .pem file with the cert and the key with the specified name

func AddOrUpdateDHParam

func AddOrUpdateDHParam(name string, dh []byte, fs file.Filesystem) (string, error)

AddOrUpdateDHParam creates a dh parameters file with the specified name

func CreateSSLCert

func CreateSSLCert(name string, cert, key, ca []byte) (*ingress.SSLCert, error)

CreateSSLCert creates an SSLCert and avoids writing on disk

func FullChainCert

func FullChainCert(in string, fs file.Filesystem) ([]byte, error)

FullChainCert checks if a certificate file contains issues in the intermediate CA chain Returns a new certificate with the intermediate certificates. If the certificate does not contains issues with the chain it return an empty byte array

func GetFakeSSLCert

func GetFakeSSLCert() ([]byte, []byte)

GetFakeSSLCert creates a Self Signed Certificate Based in the code https://golang.org/src/crypto/tls/generate_cert.go

func IsValidHostname

func IsValidHostname(hostname string, commonNames []string) bool

IsValidHostname checks if a hostname is valid in a list of common names

Types

This section is empty.

Jump to

Keyboard shortcuts

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