2022-04-29 07:21:29 -04:00
|
|
|
//go:build disable_tpm_simulator
|
|
|
|
|
2022-09-05 03:06:08 -04:00
|
|
|
/*
|
|
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2022-04-29 07:21:29 -04:00
|
|
|
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")
|
|
|
|
}
|