certs

package
v0.5.17 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertToPEMBase64

func CertToPEMBase64(der []byte) string

certToPEMBase64 returns the Base64 encoded PEM block for a given DER certificate (i.e., it returns "Base64(PEM(asn1))").

func GetOrCreateX509KeyPair

func GetOrCreateX509KeyPair(opts CertificateOptions) (*tls.Certificate, error)

func LoadX509KeyPair

func LoadX509KeyPair(certPath, keyPath string) (*tls.Certificate, error)

Types

type CertificateOptions

type CertificateOptions struct {
	CertPath string
	KeyPath  string
	Hostname string
	Address  string
	Lifetime time.Duration
}

Jump to

Keyboard shortcuts

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