Documentation ¶
Overview ¶
Package mssim provides an interface for communicating with a TPM simulator
Index ¶
- type PlatformCommandError
- type Tcti
- func (t *Tcti) Close() (err error)
- func (t *Tcti) MakeSticky(handle tpm2.Handle, sticky bool) error
- func (t *Tcti) Read(data []byte) (int, error)
- func (t *Tcti) Reset() error
- func (t *Tcti) SetLocality(locality uint8) error
- func (t *Tcti) Stop() (out error)
- func (t *Tcti) Write(data []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlatformCommandError ¶
type PlatformCommandError struct { Code uint32 // contains filtered or unexported fields }
PlatformCommandError corresponds to an error code in response to a platform command executed on a TPM simulator.
func (*PlatformCommandError) Error ¶
func (e *PlatformCommandError) Error() string
type Tcti ¶
type Tcti struct {
// contains filtered or unexported fields
}
Tcti represents a connection to a TPM simulator that implements the Microsoft TPM2 simulator interface.
func OpenConnection ¶
OpenConnection attempts to open a connection to a TPM simulator on the specified host and port. The port argument corresponds to the TPM command server. The simulator will also provide a platform server on port+1. If host is an empty string, it defaults to "localhost".
If successful, it returns a new Tcti instance which can be passed to tpm2.NewTPMContext.
func (*Tcti) MakeSticky ¶
MakeSticky implements tpm2.TCTI.
func (*Tcti) Reset ¶
Reset submits the reset command on the platform connection, which initiates a reset of the TPM simulator and results in the execution of _TPM_Init().
func (*Tcti) SetLocality ¶
SetLocality implements tpm2.TCTI.