tpmactions

package
v2.8.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogInfoProvider

type LogInfoProvider types.State

LogInfoProvider provides additional information used for tpm.CommandLog.

func NewLogInfoProvider

func NewLogInfoProvider(s *types.State) *LogInfoProvider

NewLogInfoProvider returns a new instance of LogInfoProvider.

func (*LogInfoProvider) CauseAction

func (p *LogInfoProvider) CauseAction() types.Action

Action returns the Action, which is the reason, why the tpm.Command was executed.

func (*LogInfoProvider) CauseCoordinates

func (p *LogInfoProvider) CauseCoordinates() tpm.CauseCoordinates

CauseCoordinates returns the coordinates of the Action, which is the reason, why the tpm.Command was executed.

type TPMEvent

type TPMEvent struct {
	DataSource types.DataSource
	PCRIndex   pcr.ID
	Type       tpmeventlog.EventType
	EventData  []byte
}

TPMEvent is a representation of `TPM2_PCR_Event`.

func NewTPMEvent

func NewTPMEvent(
	pcrIndex pcr.ID,
	dataSource types.DataSource,
	evType tpmeventlog.EventType,
	eventData []byte,
) *TPMEvent

NewTPMEvent returns a new instance of TPMEvent

func (*TPMEvent) Apply

func (ev *TPMEvent) Apply(ctx context.Context, state *types.State) error

Apply implements types.Action.

func (TPMEvent) String

func (ev TPMEvent) String() string

String implements fmt.Stringer.

type TPMEventLogAdd

type TPMEventLogAdd struct {
	PCRIndex  pcr.ID
	Algo      tpm.Algorithm
	Digest    tpm.Digest
	Type      tpmeventlog.EventType
	EventData []byte
}

TPMEvent is a representation of `TPM2_PCR_Event`.

func NewTPMEventLogAdd

func NewTPMEventLogAdd(
	pcrIndex pcr.ID,
	algo tpm.Algorithm,
	digest []byte,
	evType tpmeventlog.EventType,
	eventData []byte,
) *TPMEventLogAdd

NewTPMEvent returns a new instance of TPMEvent

func (*TPMEventLogAdd) Apply

func (ev *TPMEventLogAdd) Apply(ctx context.Context, state *types.State) error

Apply implements types.Action.

func (TPMEventLogAdd) String

func (ev TPMEventLogAdd) String() string

String implements fmt.Stringer.

type TPMExtend

type TPMExtend struct {
	DataSource types.DataSource
	PCRIndex   pcr.ID
	HashAlgo   tpm2.Algorithm
}

TPMExtend is a representation of `TPM2_PCR_Extend`.

func NewTPMExtend

func NewTPMExtend(
	pcrIndex pcr.ID,
	dataSource types.DataSource,
	hashAlgo tpm2.Algorithm,
) *TPMExtend

NewTPMExtend returns a new instance of TPMEvent.

func (*TPMExtend) Apply

func (ext *TPMExtend) Apply(ctx context.Context, state *types.State) error

Apply implements types.Action.

func (TPMExtend) String

func (ev TPMExtend) String() string

type TPMInit

type TPMInit struct {
	Locality uint8
}

TPMInit forcefully inits TPM (returns an error, if TPM is already initialized).

func NewTPMInit

func NewTPMInit(
	locality uint8,
) *TPMInit

NewTPMInit returns a new instance of TPMInit.

func (*TPMInit) Apply

func (init *TPMInit) Apply(ctx context.Context, state *types.State) error

Apply implements types.Action.

func (TPMInit) String

func (init TPMInit) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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