swtpm_localca(8)
πΈ swtpm_localca β bestie edition π
okay so real talk: swtpm_localca lives in section 8 of the manual (the sysadmin-y one), and it's the local CA girlie who makes EK and platform certs for swtpm. she's giving β¨ certificate authority β¨ and honestly she ate.
β¨ NAME β¨
swtpm_localca β the Local CA that creates EK and platform certs for swtpm π
π¦ SYNOPSIS π¦
swtpm_localca [OPTIONS]
π DESCRIPTION π
swtpm_localca is a tool that creates TPM Endorsement Key (EK) and platform certificates on the host. she doesn't do it alone bestie β she uses the swtpm_cert program to actually create the certificates. teamwork makes the dream work fr fr π
the program will typically be invoked by the swtpm_setup program, which reads the /etc/swtpm_setup.conf configuration file β and in there a variable needs to be set that points to this program. she implements the command line options that swtpm_setup uses to hand her all the necessary parameters. iykyk π«Ά
swtpm_localca will automatically try to create the signing key and certificate if the configuration points to a missing signing key. and because this certificate has to be signed by a CA, a root certificate authority also gets created β and it signs this certificate. the root CA's private key and certificate live in the same directory as the signing key, and their names are swtpm-localca-rootca-privkey.pem and swtpm-localca-rootca-cert.pem respectively. also!! the environment variable SWTPM_ROOTCA_PASSWORD can be set for the password of the root CA's private key. π
note, and this one's important bestie: due to limitations of certtool, the possible passwords used for securing the root CA's private key and the intermediate CA's private key have to be passed over the command line β which means they will be visible to others on the system ππ if you're concerned about this, you should create the CAs elsewhere and copy them onto the target system. no cap, that's the move.
the following options are supported:
π OPTIONS π
--typetype β this parameter tells her the type of certificate to create. type can be one of the following:ek, orplatform. pick your fighter π--dirdir β this parameter is the directory the certificate gets stored into. the EK certificate goes in this directory under the nameek.cert, and the platform certificate under the nameplatform.cert. cute and organized π--ekek or--keykey β this parameter is the modulus of the public key of the endorsement key (EK), provided as a sequence of ASCII hex digits.- the
--keyoption is an alias for--ekand should be used if key parameters for another key than an endorsement key are passed. - in case ECC (elliptic curve cryptography) keys are used, the parameter must have the format
--ek x=<hex digits>,y=<hex digits>,id=<curve id>. theid=<curve id>part is optional and only necessary for ECC curves other thansecp256r1. π
- the
--vmidID β this parameter is the ID of the VM for which to create the certificate.--logfile<logfile> β the log file to log output to; by default logging goes tostdoutandstderron the console. (default is main character energy on your terminal, basically β¨)--configfile<configuration file> β the configuration file to use. if omitted, the default configuration file/etc/swtpm-localca.confwill be used.--optsfile<options file> β the options file to use. if omitted, the default options file/etc/swtpm-localca.optionswill be used.--tpm-spec-family,--tpm-spec-revision,--tpm-spec-levelβ TPM specification parameters that describe the specification that was followed for the TPM implementation. these parameters get passed toswtpm_certfor the creation of the EK certificate. π--tpm2β create TPM 2 compliant certificates. slay π--allow-signingβ create an EK that can also be used for signing. without this option, the EK can only be used for key encipherment. β οΈ this option requires--tpm2.--decryptionβ if--allow-signingis passed and the EK should also be usable for key encipherment, this option must be passed. otherwise key encipherment is the default. β οΈ this option requires--tpm2. (yes she's a little stacked, keep up π«Ά)
π SEE ALSO π
swtpm-localca.conf, swtpm-localca.options, swtpm_setup, swtpm_setup.conf
π REPORTING BUGS π
report bugs to Stefan Berger <stefanb@linux.vnet.ibm.com> β he's the one to @ fr fr π
that's the whole vibe bestie, go make some certs πβ¨
this page is from swtpm and it's dated 2026-08-23 β that's the manual swtpm_localca(8), and honestly? iconic. ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: swtpm 0.10.2-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: swtpm 0.10.2-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: swtpm 0.10.2-160000.1.1 Β· BSD-3-Clause
- opensuse-leap 16.0: swtpm 0.10.2-160000.1.1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms