ca

package
v0.0.0-...-22af4f1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_VALID   string = "valid"
	STATUS_EXPIRED string = "expired"
	STATUS_REVOKED string = "revoked"
)

Variables

This section is empty.

Functions

func DumpCertPEM

func DumpCertPEM(prefix string, status string, certPEM *bytes.Buffer, keyPEM *bytes.Buffer)

Types

type CA

type CA struct {
	Cert    *x509.Certificate
	Key     *rsa.PrivateKey
	CertPEM *bytes.Buffer
	KeyPEM  *bytes.Buffer
	// contains filtered or unexported fields
}

func New

func New(suffix string) *CA

func (*CA) ClientCert

func (ca *CA) ClientCert() *ClientCert

func (*CA) ExpiredClientCert

func (ca *CA) ExpiredClientCert() *ClientCert

func (*CA) ExpiredServerCert

func (ca *CA) ExpiredServerCert() *ServerCert

func (*CA) IntermediateCA

func (ca *CA) IntermediateCA(suffix string) *CA

func (*CA) RevokedClientCert

func (ca *CA) RevokedClientCert() *ClientCert

func (*CA) RevokedServerCert

func (ca *CA) RevokedServerCert() *ServerCert

func (*CA) ServerCert

func (ca *CA) ServerCert() *ServerCert

type ClientCert

type ClientCert struct {
	Cert    *x509.Certificate
	Key     *rsa.PrivateKey
	CertPEM *bytes.Buffer
	KeyPEM  *bytes.Buffer
}

type ServerCert

type ServerCert struct {
	Cert    *x509.Certificate
	Key     *rsa.PrivateKey
	CertPEM *bytes.Buffer
	KeyPEM  *bytes.Buffer
}

Jump to

Keyboard shortcuts

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