tpmmodule

package
v0.0.0-...-b2cdabd Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTPMDevice io.ReadWriteCloser //nolint:gochecknoglobals

DefaultTPMDevice used if not specified in the config.

Functions

func New

func New(certType string, configJSON json.RawMessage) (module certhandler.CertModule, err error)

New creates ssh module instance.

Types

type TPMModule

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

TPMModule TPM certificate module.

func (*TPMModule) ApplyCertificate

func (module *TPMModule) ApplyCertificate(x509Certs []*x509.Certificate) (
	certInfo certhandler.CertInfo, password string, err error,
)

ApplyCertificate applies certificate.

func (*TPMModule) Clear

func (module *TPMModule) Clear() (err error)

Clear clears security storage.

func (*TPMModule) Close

func (module *TPMModule) Close() (err error)

Close closes TPM module.

func (*TPMModule) CreateKey

func (module *TPMModule) CreateKey(password, algorithm string) (key crypto.PrivateKey, err error)

CreateKey creates key pair.

func (*TPMModule) RemoveCertificate

func (module *TPMModule) RemoveCertificate(certURL, password string) (err error)

RemoveCertificate removes certificate.

func (*TPMModule) RemoveKey

func (module *TPMModule) RemoveKey(keyURL, password string) (err error)

RemoveKey removes key.

func (*TPMModule) SetOwner

func (module *TPMModule) SetOwner(password string) (err error)

SetOwner owns security storage.

func (*TPMModule) ValidateCertificates

func (module *TPMModule) ValidateCertificates() (
	validInfos []certhandler.CertInfo, invalidCerts, invalidKeys []string, err error,
)

ValidateCertificates returns list of valid pairs, invalid certificates and invalid keys.

Jump to

Keyboard shortcuts

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