swtpm_cert(8)
π
swtpm_cert β okay so this is the swtpm_cert(8) page, welcome
Bestie. Sit down. We're gonna talk about swtpm_cert, the tool that makes EK and platform certs for swtpm (both the 1.2 and the 2.0 girlies). π
β¨ NAME β¨
swtpm_cert β the tool that creates EK and platform certs for swtpm (1.2 & 2.0), no cap π
πΈ SYNOPSIS πΈ
swtpm_cert [OPTIONS]
π¦ DESCRIPTION π¦
So swtpm_cert is a local CA tool that creates X.509v3 certificates for the TPM's Endorsement Key. And the whole reason this specific tool exists is genuinely iconic: it works without access to the Endorsement Key's private key. Like, normally tools want either a self-signed certificate request or straight-up access to the private key to issue a cert. This one? It works with only the public key part. Periodt. π
The following options are supported:
π OPTIONS π
--type {ek|platform}β the type of certificate you're creating; if you don't say anything, an EK certificate gets created by default β¨--pubkey <filename>β the public key (EK) in PEM format π--modulus <hex digits>β the modulus of the public key, as a string of hex digits. You can pass this instead of the--pubkeyoption, iykyk.--ecc-x <hex digits>β the elliptic curve parameter x, as a string of hex digits.--ecc-y <hex digits>β the elliptic curve parameter y, as a string of hex digits.--ecc-curveid <curve id>β the elliptic curve's id.secp256r1,secp384r1, andsecp521r1are supported. If you don't give this option,secp256r1is assumed π--exponent <exponent>β the exponent of the public key. By default0x10001is assumed.--signkey <filename>β the key used for signing the certificate. Heads up: the file must be in PEM format π₯--signkey-password <password>β optional password for the signing key.--signkey-pwd <pwd>β alternative option for passing the signing key password. The following formats are supported for pwd:<password>β direct passwordpass:<password>β direct passwordfile:<filename>β password in filefd:<file descriptor>β read password from file descriptorenv:<environment variable>β read password from env. variable
All passwords read from files and file descriptors must be a maximum of 255 bytes (plus one byte for terminating NUL byte). Not me warning you about the byte limit π
--parentkey-password <password>β optional password for a parent key. In case a TPM key is used for signing, this would be the password for the TPM's storage root key (SRK).--parentkey-pwd <pwd>β alternative option for passing the parentkey password. See the description above for supported pwd formats π«Ά--issuercert <filename>β the X.509 certificate of this signer that takes on the role of a local CA π--out-cert <filename>β the name of the file to write the X.509v3 certificate into. The output will be in PEM format.--serial <serial number>β optional 32bit serial number for the certificate.--days <number>β the number of days the certificate is valid; by default it is valid for 365 days π--pemβ write the resulting certificate in PEM format; DER format is the default.--tpm-manufacturer <name>β the name of the TPM manufacturer.--tpm-model <model>β the TPM model (part number).--tpm-version <version>β the TPM's firmware version.--platform-manufacturer <name>β the name of the platform manufacturer.--platform-model <model>β the platform model.--platform-version <version>β the platform's version.--subject <subject>β subject, to for example provide the location of the TPM in the formatC=<country>,ST=<state>,L=<location>. Note that the location must no contain any spaces β οΈ (yes, that says "no", quoting the original, she's quirky like that).--tpm2β issue TPM 2 compliant certificates π«--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.--print-capabilities(since v0.3) β print capabilities that were added toswtpm_certafter version 0.2. The output may contain the following:
{
"type": "swtpm_cert",
"features": [
"cmdarg-signkey-pwd",
"cmdarg-parentkey-pwd"
],
"version": "0.7.0"
}
The version field is available since 0.7. β
The meaning of the feature verbs is as follows:
cmdarg-signkey-pwdβ the--signkey-pwdoption is supported.cmdarg-parentkey-pwdβ the--parentkey-pwdoption is supported.
--help,-hβ display the help screen π«Ά
π SEE ALSO π
Literally nothing here yet bestie β the section exists, the vibes are empty. π
π REPORTING BUGS π
Report bugs to Stefan Berger <stefanb@linux.vnet.ibm.com> β he's the main character of this bug tracker, respect it.
ngl if something's cooked, email the address above instead of yelling into the void. π
β¨ that's the whole page, bestie β¨ this is from the swtpm source, dated 2026-08-23 β swtpm_cert(8), and you ate that, no crumbs ππ§π
π¦ 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