certs

package
v0.0.0-...-a5f9fc7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCertificatesToPool

func AddCertificatesToPool(pool *x509.CertPool, extraCertificateLocation string) error

Get global Certificate pool including x509.SystemCertPool() + extraCertificateLocation

func AppendExtraCaCert

func AppendExtraCaCert(extraCertificateLocation string, certPem []byte) []byte

Append all certificates specified via extraCertificateLocation to the given PEM formatted byte slice

func GetAllCerts

func GetAllCerts(pemData []byte) ([]*x509.Certificate, error)

Decode all Certifactes given in the PEM formatted input slice and return the Certificates as a list. It returns an error if any of the content is not a Certificate.

func GetExtraCaCert

func GetExtraCaCert(extraCertificateLocation string) ([]byte, []*x509.Certificate, error)

Returns the Certificates specified via extraCertificateLocation as a PEM formatted byte slice and as a list of certificates.

func MakeSelfSignedCert

func MakeSelfSignedCert(certName string, dnsNames []string, debugLogger *log.Logger) (certPEMBlock []byte, keyPEMBlock []byte, err error)

MakeSelfSignedCert creates a self-signed certificate and returns it as a PEM encoded byte slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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