cert

package
v0.0.0-...-36354f6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SubjectIssuer = "k8s"
)

Functions

func GenerateCertificate

func GenerateCertificate(hosts []string) (*Certificate, *Certificate, error)

Types

type After

type After struct {
	// contains filtered or unexported fields
}

func NewAfter

func NewAfter(year, month, day int) After

func (After) AfterDate

func (a After) AfterDate(before time.Time) time.Time

type CertNotify

type CertNotify struct {
	// contains filtered or unexported fields
}

func New

func New(certFile, keyFile string) (*CertNotify, error)

func (*CertNotify) GetCertificate

func (cm *CertNotify) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error)

func (*CertNotify) Stop

func (cm *CertNotify) Stop()

func (*CertNotify) Watch

func (cm *CertNotify) Watch() error

type Certificate

type Certificate struct {
	Private     []byte
	Certificate []byte
}

func GenerateRootCA

func GenerateRootCA() (*Certificate, error)

func GenerateServer

func GenerateServer(hosts []string, rootCert, rootKey []byte) (*Certificate, error)

type CertificateConfig

type CertificateConfig struct {
	CryptographyType CryptographyType
	Bits             int
	After            After
}

type CryptographyType

type CryptographyType int
const (
	RSA CryptographyType = iota
	ECDSA
)

Jump to

Keyboard shortcuts

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