certs

package
v0.0.1 Latest Latest
Warning

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

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

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