certificate

package
v0.0.0-...-d79ed59 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func New

func New(caRootBlock [][]byte, cert, privateKey []byte) (*Manager, error)

func (*Manager) CommonName

func (c *Manager) CommonName() string

func (*Manager) GenerateCSR

func (c *Manager) GenerateCSR(deviceID string) ([]byte, []byte, error)

func (*Manager) GetCertificates

func (c *Manager) GetCertificates() (*x509.CertPool, *x509.Certificate, crypto.PrivateKey)

GetCertificates returns the CA certificate, client certificate and private key.

func (*Manager) SetCertificate

func (c *Manager) SetCertificate(cert, privateKey []byte) error

Certificates set a new certificate and a private key.

func (*Manager) Signature

func (c *Manager) Signature() []byte

Signature returns the client certificate signature.

func (*Manager) WriteCertificate

func (c *Manager) WriteCertificate(certPath, keyPath string) error

Jump to

Keyboard shortcuts

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