tpm-helpers/backend/socket.go
Ettore Di Giacinto 1ab3e10e4d
Add backends and simulated TPM device
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
2022-02-17 12:33:01 +01:00

14 lines
198 B
Go

package backend
import "net"
func Socket(f string) (*FakeTPM, error) {
conn, err := net.Dial("unix", f)
if err != nil {
return nil, err
}
return &FakeTPM{
ReadWriteCloser: conn,
}, nil
}