swtpm

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Process

type Process struct {
	// contains filtered or unexported fields
}

Process manages an swtpm subprocess.

func Start

func Start(ctx context.Context, stateDir string) (*Process, error)

Start launches an swtpm instance. If stateDir has no TPM state, runs swtpm_setup first to initialize state and create EK cert. Context controls the startup timeout (not the process lifetime).

func (*Process) Addr

func (p *Process) Addr() string

Addr returns the Unix socket path for TPM commands.

func (*Process) CACertDir

func (p *Process) CACertDir() string

CACertDir returns the path containing swtpm's local CA certificates.

func (*Process) Stop

func (p *Process) Stop() error

Stop gracefully shuts down the swtpm process and cleans up resources. Safe to call concurrently or multiple times.

Jump to

Keyboard shortcuts

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