cert

package
v0.0.0-...-8092c8a Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultRSAKeySize is the default key size used when created RSA keys.
	DefaultRSAKeySize = 2048

	// DefaultCertDuration is the default lifespan used when creating certificates (10 years).
	DefaultCertDuration = time.Hour * 24 * 365 * 10

	RSAKeyType            = "RSA PRIVATE KEY"
	PublicKeyType         = "PUBLIC KEY"
	CertificateType       = "CERTIFICATE"
	SystemPrivilegedGroup = "system:masters"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	SignedCert(opts *Options) (Interface, error)
	GetEncodeKeyAndCert() ([]byte, []byte, error)
}

func BuildCert

func BuildCert() (Interface, error)

BuildCert create a new credit.

func LoadCaKeyAndPem

func LoadCaKeyAndPem(key, pem []byte) (Interface, error)

LoadCaKeyAndPem parses the ca key and pem.

type Options

type Options struct {
	CommonName   string
	Organization []string
	DNSNames     []string
	IPAddresses  []net.IP
	Usages       x509.KeyUsage
	ExtKeyUsage  []x509.ExtKeyUsage
	SelfSigned   bool
}

Options contains the basic fields required for creating a certificate.

func KubernetesCaCreditOpts

func KubernetesCaCreditOpts() *Options

KubernetesCaCreditOpts default kubernetes ca credit options

Jump to

Keyboard shortcuts

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