tss

package module
v0.0.0-...-32a2288 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCGVendorID

type TCGVendorID uint32

TCGVendorID TPM manufacturer id

func (TCGVendorID) String

func (id TCGVendorID) String() string

type TPM

type TPM struct {
	Version TPMVersion
	Interf  TPMInterface

	SysPath string
	RWC     io.ReadWriteCloser
}

TPM interfaces with a TPM device on the system.

func NewTPM

func NewTPM() (*TPM, error)

NewTPM looks for a TPM and initializes it for further use

func (*TPM) Close

func (t *TPM) Close() error

Close closes the TPM socket and wipe locked buffers

func (*TPM) GetCapability

func (t *TPM) GetCapability(cap, subcap uint32) ([]interface{}, error)

GetCapability requests the TPMs capability function and returns an interface. User needs to take care of the data for now.

func (*TPM) GetVersion

func (t *TPM) GetVersion() TPMVersion

GetVersion returns the TPM version

func (*TPM) Info

func (t *TPM) Info() (*TPMInfo, error)

Info returns information about the TPM.

func (*TPM) MeasurementLog

func (t *TPM) MeasurementLog() ([]byte, error)

MeasurementLog reads the TCPA eventlog in binary format from the Linux kernel

func (*TPM) NVReadValue

func (t *TPM) NVReadValue(index uint32, ownerPassword string, size, offhandle uint32) ([]byte, error)

NVReadValue reads a value from a given NVRAM index Type and byte order for TPM1.2 interface: (offset uint32) Type and byte oder for TPM2.0 interface: (authhandle uint32)

func (*TPM) ReadNVPublic

func (t *TPM) ReadNVPublic(index uint32) ([]byte, error)

ReadNVPublic reads public data about an NVRAM index. Permissions and what so not.

type TPMInfo

type TPMInfo struct {
	Version      TPMVersion
	Interface    TPMInterface
	VendorInfo   string
	Manufacturer TCGVendorID

	// FirmwareVersionMajor and FirmwareVersionMinor describe
	// the firmware version of the TPM, but are only available
	// for TPM 2.0 devices.
	FirmwareVersionMajor int
	FirmwareVersionMinor int
}

TPMInfo contains information about the version & interface of an open TPM.

type TPMInterface

type TPMInterface uint8

TPMInterface indicates how the client communicates with the TPM.

const (
	TPMInterfaceDirect TPMInterface = iota
	TPMInterfaceKernelManaged
	TPMInterfaceDaemonManaged
)

TPM interfaces

type TPMVersion

type TPMVersion uint8

TPMVersion is used to configure a preference in which TPM to use, if multiple are available.

const (
	TPMVersionAgnostic TPMVersion = iota
	TPMVersion12
	TPMVersion20
)

TPM versions

Jump to

Keyboard shortcuts

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