File: open_other.go

package info (click to toggle)
golang-github-google-go-tpm 0.9.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,932 kB
  • sloc: makefile: 13
file content (22 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//go:build !windows

package transport

import (
	legacy "github.com/google/go-tpm/legacy/tpm2"
)

// OpenTPM opens the TPM at the given path. If no path is provided, it will
// attempt to use reasonable defaults.
//
// Deprecated: Please use the individual transport packages (e.g.,
// go-tpm/tpm2/transport/linuxtpm).
func OpenTPM(path ...string) (TPMCloser, error) {
	rwc, err := legacy.OpenTPM(path...)
	if err != nil {
		return nil, err
	}
	return &wrappedRWC{
		transport: rwc,
	}, nil
}