2022-04-29 07:21:29 -04:00
|
|
|
//go:build disable_tpm_simulator
|
|
|
|
|
|
|
|
package simulator
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
2022-06-30 09:24:36 -04:00
|
|
|
"testing"
|
|
|
|
|
|
|
|
"go.uber.org/goleak"
|
2022-04-29 07:21:29 -04:00
|
|
|
)
|
|
|
|
|
2022-06-30 09:24:36 -04:00
|
|
|
func TestMain(m *testing.M) {
|
|
|
|
goleak.VerifyTestMain(m)
|
|
|
|
}
|
|
|
|
|
2022-04-29 07:21:29 -04:00
|
|
|
// OpenSimulatedTPM returns a simulated TPM device.
|
|
|
|
func OpenSimulatedTPM() (io.ReadWriteCloser, error) {
|
|
|
|
panic("simulator not enabled")
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewSimulatedTPMOpenFunc returns a TPMOpenFunc that opens a simulated TPM.
|
|
|
|
func NewSimulatedTPMOpenFunc() (func() (io.ReadWriteCloser, error), io.Closer) {
|
|
|
|
panic("simulator not enabled")
|
|
|
|
}
|