transport

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 16

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 OpenTPM

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

OpenTPM opens a channel to the TPM at the given path. If the file is a device, then it treats it like a normal TPM device, and if the file is a Unix domain socket, then it opens a connection to the socket.

This function may also be invoked with no paths, as tpm2.OpenTPM(). In this case, the default paths on Linux (/dev/tpmrm0 then /dev/tpm0), will be used.

Directories

Path Synopsis
Package simulator provides access to a local simulator for TPM testing.
Package simulator provides access to a local simulator for TPM testing.

Jump to

Keyboard shortcuts

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