OS Manuals

/usr/bin/swtpm_localca

Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface

From swtpm 0.10.2-r5 (enterprise-packages), captured 2026-11-08 by running swtpm_localca --help (exit 0). permalink

Usage: /usr/bin/swtpm_localca [options]

The following options are supported:

--type type           The type of certificate to create: 'ek' or 'platform'
--ek key-param        The modulus of an RSA key or x=...,y=,... for an EC key
--key key-param       Alias for --ek
--dir directory       The directory to write the resulting certificate into
--vmid vmid           The ID of the virtual machine
--optsfile file       A file containing options to pass to swtpm_cert
--configfile file     A file containing configuration parameters for directory,
                      signing key and password and certificate to use
--logfile file        A file to write a log into
--tpm-spec-family s   The implemented spec family, e.g., '2.0'
--tpm-spec-revision i The spec revision of the TPM as integer; e.g., 146
--tpm-spec-level i    The spec level of the TPM; must be an integer; e.g. 0
--tpm-manufacturer s  The manufacturer of the TPM; e.g., id:00001014
--tpm-model s         The model of the TPM; e.g., 'swtpm'
--tpm-version i       The (firmware) version of the TPM; e.g., id:20160511
--tpm2                Generate a certificate for a TPM 2
--allow-signing       The TPM 2's EK can be used for signing
--decryption          The TPM 2's EK can be used for decryption
--help, -h            Display this help screen and exit


The following environment variables are supported:

SWTPM_ROOTCA_PASSWORD  The root CA's private key password
Options (17)
OptionDescriptionSource
--type typeThis parameter indicates the type of certificate to create.help + man
--ek key-paramThis parameter indicates the modulus of the public key of the endorsement key (EK).help + man
--key key-paramAlias for --ekhelp
--dir directoryThis parameter indicates the directory into which the certificate is to be stored.help + man
--vmid vmidThis parameter indicates the ID of the VM for which to create the certificate.help + man
--optsfile fileA file containing options to pass to swtpm_certhelp + man
--configfile fileA file containing configuration parameters for directory, signing key and password and certificate to usehelp + man
--logfile fileThe log file to log output to;help + man
--tpm-spec-family, --tpm-spec-revision sTPM specification parameters that describe the specification that was followed for the TPM implementation.help + man
--tpm-spec-level iThe spec level of the TPM;help
--tpm-manufacturer sThe manufacturer of the TPM;help
--tpm-model sThe model of the TPM;help
--tpm-version iThe (firmware) version of the TPM;help
--tpm2Create TPM 2 compliant certificates.help + man
--allow-signingCreate an EK that can also be used for signing.help + man
--decryptionIf --allow-signing is passed and the EK should also be usable for key encipherment, this option must be passed.help + man
--help, -hDisplay this help screen and exithelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.