Documentation ¶
Overview ¶
Package simulator provides a go interface to the Microsoft TPM2 simulator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUsingClosedSimulator = errors.New("attempting to use a closed simulator")
ErrUsingClosedSimulator is returned if any operation on a Simulator is attempted after it is closed.
Functions ¶
This section is empty.
Types ¶
type Simulator ¶
type Simulator struct {
// contains filtered or unexported fields
}
Simulator represents a go-tpm compatible interface to the IBM TPM2 simulator. Similar to the file-based (for linux) or syscall-based (for Windows) TPM handles, no synchronization is provided; the same simulator handle should not be used from multiple threads.
func Get ¶
Get the pointer to an initialized, powered on, and started simulator. As only one simulator may be running at a time, a second call to Get() block until the first Simulator is Closed.
func GetWithFixedSeedInsecure ¶
GetWithFixedSeedInsecure behaves like Get() expect that all of the notinternal hierarchy seeds are derived from the input seed. Note that this function compromises the security of the keys/seeds and should only be used for tests.
func (*Simulator) Close ¶
Close cleans up and stops the simulator, Close() should always be called when the Simulator is no longer needed, freeing up other callers to use Get().
func (*Simulator) ManufactureReset ¶
ManufactureReset behaves like Reset() except that the TPM is complete wiped. All data (NVData, Hierarchy seeds, etc...) is cleared or reset.