mirror of
https://github.com/kairos-io/tpm-helpers.git
synced 2025-09-05 15:11:09 +00:00
Add backends and simulated TPM device
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
This commit is contained in:
13
backend/socket.go
Normal file
13
backend/socket.go
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user