common

package
v2.0.0-...-f1ce5d7 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TPMKeyVersion = 0
)

Variables

View Source
var TPMDEVICES = []string{"/dev/tpm0", "/dev/tpmrm0"}

Functions

func OpenTPM

func OpenTPM(path string) (io.ReadWriteCloser, error)

Types

type AuthCallback

type AuthCallback interface {
	GetSession() (auth tpm2.Session, closer func() error, err error) // this supplies the session handle to the library
	GetPassword() []byte
	GetOwnerPassword() []byte
	GetPolicyDigest() []byte
}

type PCRCallback

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

for pcr sessions

func NewPCRSession

func NewPCRSession(rwr transport.TPM, password []byte, ownerpassword []byte, policyDigest []byte, sel []tpm2.TPMSPCRSelection, pcrDigest []byte) (PCRCallback, error)

func (PCRCallback) GetOwnerPassword

func (p PCRCallback) GetOwnerPassword() []byte

func (PCRCallback) GetPCRDigest

func (p PCRCallback) GetPCRDigest() []byte

func (PCRCallback) GetPassword

func (p PCRCallback) GetPassword() []byte

func (PCRCallback) GetPolicyDigest

func (p PCRCallback) GetPolicyDigest() []byte

func (PCRCallback) GetSession

func (p PCRCallback) GetSession() (auth tpm2.Session, closer func() error, err error)

type PasswordCallback

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

for password sessions

func NewPasswordSession

func NewPasswordSession(rwr transport.TPM, password []byte, ownerpassword []byte, policyDigest []byte) (PasswordCallback, error)

func (PasswordCallback) GetOwnerPassword

func (p PasswordCallback) GetOwnerPassword() []byte

func (PasswordCallback) GetPassword

func (p PasswordCallback) GetPassword() []byte

func (PasswordCallback) GetPolicyDigest

func (p PasswordCallback) GetPolicyDigest() []byte

func (PasswordCallback) GetSession

func (p PasswordCallback) GetSession() (auth tpm2.Session, closer func() error, err error)

Jump to

Keyboard shortcuts

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