.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "swtpm_localca 8" .TH swtpm_localca 8 2024-02-10 swtpm "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME swtpm_localca \- Local CA to create EK and platform certs for swtpm .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBswtpm_localca [OPTIONS]\fR .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBswtpm_localca\fR is a tool to create TPM Endorsement Key (EK) and platform certificates on the host. It uses the \fIswtpm_cert\fR program to create the certificates. .PP The program will typically be invoked by the \fIswtpm_setup\fR program that uses the \fI/etc/swtpm_setup.conf\fR configuration file where a variable needs to be set that points to this program. It implements command line options that the \fIswtpm_setup\fR program uses to provide the necessary parameters to it. .PP \&\fBswtpm_localca\fR will automatically try to create the signing key and certificate if the configuration points to a missing signing key. Since this certificate must be signed by a CA, a root certificate authority will also be created and will sign this certificate. The root CA's private key and certificate will be located in the same directory as the signing key and have the names swtpm\-localca\-rootca\-privkey.pem and swtpm\-localca\-rootca\-cert.pem respectively. The environment variable SWTPM_ROOTCA_PASSWORD can be set for the password of the root CA's private key. .PP Note: Due to limitations of 'certtool', the possible passwords used for securing the root CA's private key and the intermedia CA's private key have to be passed over the command line and therefore will be visible to others on the system. If you are concerned about this, you should create the CAs elsewhere and copy them onto the target system. .PP The following options are supported: .IP "\fB\-\-type type\fR" 4 .IX Item "--type type" This parameter indicates the type of certificate to create. The type parameter may be one of the following: \fIek\fR, or \fIplatform\fR .IP "\fB\-\-dir dir\fR" 4 .IX Item "--dir dir" This parameter indicates the directory into which the certificate is to be stored. The EK certificate is stored in this directory under the name ek.cert and the platform certificate under the name platform.cert. .IP "\fB\-\-ek ek\fR" 4 .IX Item "--ek ek" This parameter indicates the modulus of the public key of the endorsement key (EK). The public key is provided as a sequence of ASCII hex digits. .Sp In case ECC (elliptic curve crypography) keys are used, the parameter must have the format \-\-ek x=,y=,id=. The id= part is optional and only necessary for ECC curves other than secp256r1. .IP "\fB\-\-vmid ID\fR" 4 .IX Item "--vmid ID" This parameter indicates the ID of the VM for which to create the certificate. .IP "\fB\-\-logfile " 4 .IX Item "--logfile " The log file to log output to; by default logging goes to stdout and stderr on the console. .IP "\fB\-\-configfile " 4 .IX Item "--configfile " The configuration file to use. If omitted, the default configuration file \fI/etc/swtpm\-localca.conf\fR will be used. .IP "\fB\-\-optsfile " 4 .IX Item "--optsfile " The options file to use. If omitted, the default options file \&\fI/etc/swtpm\-localca.options\fR will be used. .IP "\fB\-\-tpm\-spec\-family\fR, \fB\-\-tpm\-spec\-revision\fR, \fB\-\-tpm\-spec\-level\fR" 4 .IX Item "--tpm-spec-family, --tpm-spec-revision, --tpm-spec-level" TPM specification parameters that describe the specification that was followed for the TPM implementation. The parameters will be passed to swtpm_cert for the creation of the EK certificate. .IP \fB\-\-tpm2\fR 4 .IX Item "--tpm2" Create TPM 2 compliant certificates. .IP \fB\-\-allow\-signing\fR 4 .IX Item "--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. .IP \fB\-\-decryption\fR 4 .IX Item "--decryption" If \-\-allow\-signing is passed and the EK should also be useable for key encipherment, this option must be passed. Otherwise key encipherment is the default. This option requires \-\-tpm2. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBswtpm\-localca.conf\fR, \fBswtpm\-localca.options\fR, \&\fBswtpm_setup\fR, \fBswtpm_setup.conf\fR .SH "REPORTING BUGS" .IX Header "REPORTING BUGS" Report bugs to Stefan Berger