SWTPM (swtpm v0.1.0)

Software TPM emulator.

Summary

Functions

Integrates the SWTPM module with a supervision tree, providing a standardized way to configure and start the Software TPM emulator as a supervised process.

Functions

child_spec(opts)

@spec child_spec(keyword()) :: Supervisor.child_spec()

Integrates the SWTPM module with a supervision tree, providing a standardized way to configure and start the Software TPM emulator as a supervised process.

Options

  • :state_dir - Specifies the directory where the TPM state will be stored.

  • :server_port - Specifies the TCP port used for the TPM server. Defaults to 2321.

  • :ctrl_port - Specifies the TCP port used for TPM control commands. Defaults to 2322.

  • :flags - Refer to https://man.archlinux.org/man/swtpm.8.en for full list of flags. Defaults to [:not_need_init, :startup_clear].

Example

children = [
  {SWTPM, [state_dir: "/data/tpm"]}
]

Supervisor.start_link(children, [strategy: :one_for_one, name: MySupervisor])