cert

package
v0.0.0-...-63f4cd2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertBuilder

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

CertBuilder constructs a new set of keys and certificate. Usage examples: new(CertBuilder).NewCACert(); new(CertBuilder).NewServerCert(caCert)

func (*CertBuilder) GetCert

func (cf *CertBuilder) GetCert() *x509.Certificate

func (*CertBuilder) GetCertPEM

func (cf *CertBuilder) GetCertPEM() []byte

func (*CertBuilder) GetPrivateKey

func (cf *CertBuilder) GetPrivateKey() *rsa.PrivateKey

func (*CertBuilder) GetPrivateKeyPEM

func (cf *CertBuilder) GetPrivateKeyPEM() []byte

func (*CertBuilder) GetPublicKeyPEM

func (cf *CertBuilder) GetPublicKeyPEM() []byte

func (*CertBuilder) NewCACert

func (cf *CertBuilder) NewCACert() *CertBuilder

NewCACert returns a new self-signed CA certificate.

func (*CertBuilder) NewServerCert

func (cf *CertBuilder) NewServerCert(parentCert *x509.Certificate, parentKey *rsa.PrivateKey) *CertBuilder

NewServerCert returns a new server certificate. CA root or parent certificate can be specificed in the parameters.

func (*CertBuilder) SetParent

func (cf *CertBuilder) SetParent(parent *x509.Certificate)

func (*CertBuilder) SetParentKey

func (cf *CertBuilder) SetParentKey(privateKey *rsa.PrivateKey)

func (*CertBuilder) SetTemplate

func (cf *CertBuilder) SetTemplate(orgName, commonName string, expireYears int, isCA bool)

Jump to

Keyboard shortcuts

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