| 1 |
//go:build !windows |
| 2 |
|
| 3 |
package transport |
| 4 |
|
| 5 |
import ( |
| 6 |
legacy "github.com/google/go-tpm/legacy/tpm2" |
| 7 |
) |
| 8 |
|
| 9 |
// OpenTPM opens the TPM at the given path. If no path is provided, it will |
| 10 |
// attempt to use reasonable defaults. |
| 11 |
// |
| 12 |
// Deprecated: Please use the individual transport packages (e.g., |
| 13 |
// go-tpm/tpm2/transport/linuxtpm). |
| 14 |
func OpenTPM(path ...string) (TPMCloser, error) { |
| 15 |
rwc, err := legacy.OpenTPM(path...) |
| 16 |
if err != nil { |
| 17 |
return nil, err |
| 18 |
} |
| 19 |
return &wrappedRWC{ |
| 20 |
transport: rwc, |
| 21 |
}, nil |
| 22 |
} |