certificate

package
v0.0.0-...-14b4a77 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: Apache-2.0 Imports: 13 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, registrationCertificate, registrationPrivateKey []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) HaveDeviceCertificate

func (c *Manager) HaveDeviceCertificate() bool

func (*Manager) RollbackCertificate

func (c *Manager) RollbackCertificate()

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) TLSConfig

func (c *Manager) TLSConfig() (*tls.Config, error)

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