Documentation ¶
Overview ¶
Package hwsec implements the libraries and utilities which are used for remote bundles with the same name 'hwsec'.
Index ¶
- type AttestationDBus
- func (a *AttestationDBus) CreateCertificateRequest(ctx context.Context, req *apb.CreateCertificateRequestRequest) (*apb.CreateCertificateRequestReply, error)
- func (a *AttestationDBus) CreateEnrollRequest(ctx context.Context, req *apb.CreateEnrollRequestRequest) (*apb.CreateEnrollRequestReply, error)
- func (a *AttestationDBus) DeleteKeys(ctx context.Context, req *apb.DeleteKeysRequest) (*apb.DeleteKeysReply, error)
- func (a *AttestationDBus) FinishCertificateRequest(ctx context.Context, req *apb.FinishCertificateRequestRequest) (*apb.FinishCertificateRequestReply, error)
- func (a *AttestationDBus) FinishEnroll(ctx context.Context, req *apb.FinishEnrollRequest) (*apb.FinishEnrollReply, error)
- func (a *AttestationDBus) GetEnrollmentID(ctx context.Context, req *apb.GetEnrollmentIdRequest) (*apb.GetEnrollmentIdReply, error)
- func (a *AttestationDBus) GetKeyInfo(ctx context.Context, req *apb.GetKeyInfoRequest) (*apb.GetKeyInfoReply, error)
- func (a *AttestationDBus) GetStatus(ctx context.Context, req *apb.GetStatusRequest) (*apb.GetStatusReply, error)
- func (a *AttestationDBus) RegisterKeyWithChapsToken(ctx context.Context, req *apb.RegisterKeyWithChapsTokenRequest) (*apb.RegisterKeyWithChapsTokenReply, error)
- func (a *AttestationDBus) SetKeyPayload(ctx context.Context, req *apb.SetKeyPayloadRequest) (*apb.SetKeyPayloadReply, error)
- func (a *AttestationDBus) SignEnterpriseChallenge(ctx context.Context, req *apb.SignEnterpriseChallengeRequest) (*apb.SignEnterpriseChallengeReply, error)
- func (a *AttestationDBus) SignSimpleChallenge(ctx context.Context, req *apb.SignSimpleChallengeRequest) (*apb.SignSimpleChallengeReply, error)
- type AttestationHelperRemote
- type CmdHelperRemote
- type CmdHelperRemoteImpl
- type CmdRunnerRemote
- type FullHelperRemote
- type TPMClearer
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 ¶
NewAttestationDBus use the dut and rpc hint objects to construct AttestationDBus.
func (*AttestationDBus) CreateCertificateRequest ¶
func (a *AttestationDBus) CreateCertificateRequest(ctx context.Context, req *apb.CreateCertificateRequestRequest) (*apb.CreateCertificateRequestReply, error)
CreateCertificateRequest calls "CreateCertificateRequest" gRPC D-Bus Interface.
func (*AttestationDBus) CreateEnrollRequest ¶
func (a *AttestationDBus) CreateEnrollRequest(ctx context.Context, req *apb.CreateEnrollRequestRequest) (*apb.CreateEnrollRequestReply, error)
CreateEnrollRequest calls "CreateEnrollRequest" gRPC D-Bus Interface.
func (*AttestationDBus) DeleteKeys ¶
func (a *AttestationDBus) DeleteKeys(ctx context.Context, req *apb.DeleteKeysRequest) (*apb.DeleteKeysReply, error)
DeleteKeys calls "DeleteKeys" gRPC D-Bus Interface.
func (*AttestationDBus) FinishCertificateRequest ¶
func (a *AttestationDBus) FinishCertificateRequest(ctx context.Context, req *apb.FinishCertificateRequestRequest) (*apb.FinishCertificateRequestReply, error)
FinishCertificateRequest calls "FinishCertificateRequest" gRPC D-Bus Interface.
func (*AttestationDBus) FinishEnroll ¶
func (a *AttestationDBus) FinishEnroll(ctx context.Context, req *apb.FinishEnrollRequest) (*apb.FinishEnrollReply, error)
FinishEnroll calls "FinishEnroll" gRPC D-Bus Interface.
func (*AttestationDBus) GetEnrollmentID ¶
func (a *AttestationDBus) GetEnrollmentID(ctx context.Context, req *apb.GetEnrollmentIdRequest) (*apb.GetEnrollmentIdReply, error)
GetEnrollmentID calls "GetEnrollmentID" gRPC D-Bus Interface.
func (*AttestationDBus) GetKeyInfo ¶
func (a *AttestationDBus) GetKeyInfo(ctx context.Context, req *apb.GetKeyInfoRequest) (*apb.GetKeyInfoReply, error)
GetKeyInfo calls "GetKeyInfo" gRPC D-Bus Interface.
func (*AttestationDBus) GetStatus ¶
func (a *AttestationDBus) GetStatus(ctx context.Context, req *apb.GetStatusRequest) (*apb.GetStatusReply, error)
GetStatus calls "GetStatus" gRPC D-Bus Interface.
func (*AttestationDBus) RegisterKeyWithChapsToken ¶
func (a *AttestationDBus) RegisterKeyWithChapsToken(ctx context.Context, req *apb.RegisterKeyWithChapsTokenRequest) (*apb.RegisterKeyWithChapsTokenReply, error)
RegisterKeyWithChapsToken calls "RegisterKeyWithChapsToken" gRPC D-Bus Interface.
func (*AttestationDBus) SetKeyPayload ¶
func (a *AttestationDBus) SetKeyPayload(ctx context.Context, req *apb.SetKeyPayloadRequest) (*apb.SetKeyPayloadReply, error)
SetKeyPayload calls "SetKeyPayload" gRPC D-Bus Interface.
func (*AttestationDBus) SignEnterpriseChallenge ¶
func (a *AttestationDBus) SignEnterpriseChallenge(ctx context.Context, req *apb.SignEnterpriseChallengeRequest) (*apb.SignEnterpriseChallengeReply, error)
SignEnterpriseChallenge calls "SignEnterpriseChallenge" gRPC D-Bus Interface.
func (*AttestationDBus) SignSimpleChallenge ¶
func (a *AttestationDBus) SignSimpleChallenge(ctx context.Context, req *apb.SignSimpleChallengeRequest) (*apb.SignSimpleChallengeReply, error)
SignSimpleChallenge calls "SignSimpleChallenge" gRPC D-Bus Interface.
type AttestationHelperRemote ¶
type AttestationHelperRemote struct {
hwsec.AttestationHelper
}
AttestationHelperRemote extends the function set of hwsec.AttestationHelper
func NewAttestationHelper ¶
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
type CmdHelperRemoteImpl ¶
type CmdHelperRemoteImpl struct {
// contains filtered or unexported fields
}
CmdHelperRemoteImpl implements the helper functions for CmdHelperRemote
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) 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 ¶
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