hwsec

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package hwsec implements the libraries and utilities which are used for remote bundles with the same name 'hwsec'.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttestationDBus

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

AttestationDBus talks to attestation service via gRPC D-Bus APIs.

func NewAttestationDBus

func NewAttestationDBus(d *dut.DUT, r *testing.RPCHint) (*AttestationDBus, error)

NewAttestationDBus use the dut and rpc hint objects to construct AttestationDBus.

func (*AttestationDBus) CreateCertificateRequest

CreateCertificateRequest calls "CreateCertificateRequest" gRPC D-Bus Interface.

func (*AttestationDBus) CreateEnrollRequest

CreateEnrollRequest calls "CreateEnrollRequest" gRPC D-Bus Interface.

func (*AttestationDBus) DeleteKeys

DeleteKeys calls "DeleteKeys" gRPC D-Bus Interface.

func (*AttestationDBus) FinishCertificateRequest

FinishCertificateRequest calls "FinishCertificateRequest" gRPC D-Bus Interface.

func (*AttestationDBus) FinishEnroll

FinishEnroll calls "FinishEnroll" gRPC D-Bus Interface.

func (*AttestationDBus) GetEnrollmentID

GetEnrollmentID calls "GetEnrollmentID" gRPC D-Bus Interface.

func (*AttestationDBus) GetKeyInfo

GetKeyInfo calls "GetKeyInfo" gRPC D-Bus Interface.

func (*AttestationDBus) GetStatus

GetStatus calls "GetStatus" gRPC D-Bus Interface.

func (*AttestationDBus) RegisterKeyWithChapsToken

RegisterKeyWithChapsToken calls "RegisterKeyWithChapsToken" gRPC D-Bus Interface.

func (*AttestationDBus) SetKeyPayload

SetKeyPayload calls "SetKeyPayload" gRPC D-Bus Interface.

func (*AttestationDBus) SignEnterpriseChallenge

SignEnterpriseChallenge calls "SignEnterpriseChallenge" gRPC D-Bus Interface.

func (*AttestationDBus) SignSimpleChallenge

SignSimpleChallenge calls "SignSimpleChallenge" gRPC D-Bus Interface.

type AttestationHelperRemote

type AttestationHelperRemote struct {
	hwsec.AttestationHelper
}

AttestationHelperRemote extends the function set of hwsec.AttestationHelper

func NewAttestationHelper

func NewAttestationHelper(d *dut.DUT, h *testing.RPCHint) (*AttestationHelperRemote, error)

NewAttestationHelper creates a new hwsec.AttestationHelper instance that make use of the functions implemented by AttestationHelperRemote.

type CmdHelperRemote

type CmdHelperRemote struct {
	hwsec.CmdTPMClearHelper
	CmdHelperRemoteImpl
}

CmdHelperRemote extends the function set of hwsec.CmdHelper

func NewHelper

func NewHelper(r hwsec.CmdRunner, d *dut.DUT) (*CmdHelperRemote, error)

NewHelper creates a new hwsec.CmdTPMClearHelper instance that make use of the functions implemented by CmdRunnerRemote.

type CmdHelperRemoteImpl

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

CmdHelperRemoteImpl implements the helper functions for CmdHelperRemote

func (*CmdHelperRemoteImpl) Reboot

func (h *CmdHelperRemoteImpl) Reboot(ctx context.Context) error

Reboot reboots the DUT

type CmdRunnerRemote

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

CmdRunnerRemote implements CmdRunner for remote test.

func NewCmdRunner

func NewCmdRunner(d *dut.DUT) *CmdRunnerRemote

NewCmdRunner creates a new CmdRunnerRemote instance associated with d.

func NewLoglessCmdRunner

func NewLoglessCmdRunner(d *dut.DUT) *CmdRunnerRemote

NewLoglessCmdRunner creates a new CmdRunnerRemote instance associated with d, which wouldn't print logs.

func (*CmdRunnerRemote) Run

func (r *CmdRunnerRemote) Run(ctx context.Context, cmd string, args ...string) ([]byte, error)

Run implements hwsec.CmdRunner.Run.

func (*CmdRunnerRemote) RunWithCombinedOutput

func (r *CmdRunnerRemote) RunWithCombinedOutput(ctx context.Context, cmd string, args ...string) ([]byte, error)

RunWithCombinedOutput implements hwsec.CmdRunner.RunWithCombinedOutput.

type FullHelperRemote

type FullHelperRemote struct {
	hwsec.FullHelper
	CmdHelperRemoteImpl
}

FullHelperRemote extends the function set of hwsec.FullHelper

func NewFullHelper

func NewFullHelper(r hwsec.CmdRunner, d *dut.DUT, h *testing.RPCHint) (*FullHelperRemote, error)

NewFullHelper creates a new hwsec.FullHelper with a remote AttestationClient.

type TPMClearer

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

TPMClearer clear the TPM via crossystem, this would work on both TPM1.2 and TPM2.0.

func NewTPMClearer

func NewTPMClearer(cmdRunner hwsec.CmdRunner, daemonController *hwsec.DaemonController, dut *dut.DUT) *TPMClearer

NewTPMClearer creates a new TPMClearer object, where r is used to run the command internally.

func (*TPMClearer) ClearTPM

func (tc *TPMClearer) ClearTPM(ctx context.Context) error

ClearTPM sends the TPM clear request

func (*TPMClearer) PostClearTPM

func (tc *TPMClearer) PostClearTPM(ctx context.Context) error

PostClearTPM reboots and ensure every TPM daemon is up.

func (*TPMClearer) PreClearTPM

func (tc *TPMClearer) PreClearTPM(ctx context.Context) error

PreClearTPM backups the logs

Jump to

Keyboard shortcuts

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