provisioner

package
v0.0.0-...-be3778f Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Path          = "/dev/tpm0"
	InvalidHandle = tpmutil.Handle(0x00000000)
	Algorithm     = tpm2.AlgRSASSA
	Hash          = tpm2.AlgSHA256
	CryptoHash    = crypto.SHA256
)

Variables

This section is empty.

Functions

func Flush

func Flush(rwc io.ReadWriteCloser, handle tpmutil.Handle)

Flush removes any loaded handles in the tpm. This prevent out-of-memory errors.

func FlushAndClose

func FlushAndClose(rwc io.ReadWriteCloser, handle tpmutil.Handle)

FlushAndClose removes any loaded handles in the tpm and closes it. This prevent out-of-memory errors.

func GenerateNewKeyPair

func GenerateNewKeyPair(rwc io.ReadWriteCloser) (tpmutil.Handle, crypto.PublicKey, error)

GenerateNewKeyPair creates a new primary key inside a tpm and returns the key handle and its public key. If GenerateNewKeyPair encounters an error during primary key creation, it returns an invalid tpm handle, nil public key and error.

func MarshalPublicKey

func MarshalPublicKey(key crypto.PublicKey) []byte

MarshalPublicKey converts a crypto.PublicKey value to its pem encoding.

Types

This section is empty.

Jump to

Keyboard shortcuts

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