transport

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 53

Documentation

Overview

Package transport implements types for physically talking to TPMs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToReadWriter

func ToReadWriter(tpm TPM) io.ReadWriter

ToReadWriter takes in a transport TPM and returns an io.ReadWriter wrapping the transport TPM.

Types

type TPM

type TPM interface {
	Send(input []byte) ([]byte, error)
}

TPM represents a logical connection to a TPM.

func FromReadWriter

func FromReadWriter(rw io.ReadWriter) TPM

FromReadWriter takes in a io.ReadWriter and returns a transport.TPM wrapping the io.ReadWriter.

type TPMCloser

type TPMCloser interface {
	TPM
	io.Closer
}

TPMCloser represents a logical connection to a TPM and you can close it.

func FromReadWriteCloser added in v0.9.2

func FromReadWriteCloser(rwc io.ReadWriteCloser) TPMCloser

FromReadWriteCloser takes in a io.ReadWriteCloser and returns a transport.TPMCloser wrapping the io.ReadWriteCloser.

func OpenTPM deprecated

func OpenTPM(path ...string) (TPMCloser, error)

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).

Directories

Path Synopsis
Package linuxtpm provides access to a physical TPM device via the device file.
Package linuxtpm provides access to a physical TPM device via the device file.
Package linuxudstpm provides access to a TPM device via a Unix domain socket.
Package linuxudstpm provides access to a TPM device via a Unix domain socket.
Package simulator provides access to a local simulator for TPM testing.
Package simulator provides access to a local simulator for TPM testing.
Package testhelper provides some helper code for TPM transport tests.
Package testhelper provides some helper code for TPM transport tests.
Package windowstpm implements the TPM transport on Windows using tbs.dll.
Package windowstpm implements the TPM transport on Windows using tbs.dll.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL