Debian Codegraph @

upstream/debian-unstable/man1/systemd-measure.1

raw
1 '\" t
2 .TH "SYSTEMD\-MEASURE" "1" "" "systemd 261~rc3" "systemd-measure"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-measure \- Pre\-calculate and sign expected TPM2 PCR 11 values for booted unified kernel images
24 .SH "SYNOPSIS"
25 .HP \w'\fB/usr/lib/systemd/systemd\-measure\fR\ 'u
26 \fB/usr/lib/systemd/systemd\-measure\fR [OPTIONS...]
27 .SH "DESCRIPTION"
28 .PP
29 Note: this command is experimental for now\&. While it is likely to become a regular component of systemd, it might still change in behaviour and interface\&.
30 .PP
31 \fBsystemd\-measure\fR
32 is a tool that may be used to pre\-calculate and sign the expected TPM2 PCR 11 values that should be seen when a Linux
33 \m[blue]\fBUAPI\&.5 Unified Kernel Image (UKI)\fR\m[]\&\s-2\u[1]\d\s+2
34 based on
35 \fBsystemd-stub\fR(7)
36 is booted up\&. It accepts paths to the ELF kernel image file, initrd image file, devicetree file, kernel command line file,
37 \fBos-release\fR(5)
38 file, boot splash file, and TPM2 PCR PEM public key file that make up the unified kernel image, and determines the PCR values expected to be in place after booting the image\&. Calculation starts with a zero\-initialized PCR 11, and is executed in a fashion compatible with what
39 systemd\-stub
40 does at boot\&. The result may optionally be signed cryptographically, to allow TPM2 policies that can only be unlocked if a certain set of kernels is booted, for which such a PCR signature can be provided\&.
41 .PP
42 It usually does not make sense to call this tool directly when constructing a UKI\&. Instead,
43 \fBukify\fR(1)
44 should be used; it will invoke
45 \fBsystemd\-measure\fR
46 and take care of embedding the resulting measurements into the UKI\&.
47 .SH "COMMANDS"
48 .PP
49 The following commands are understood:
50 .PP
51 \fBstatus\fR
52 .RS 4
53 This is the default command if none is specified\&. This queries the local system\*(Aqs TPM2 PCR 11 values and displays them\&. The data is written in a similar format as the
54 \fBcalculate\fR
55 command below, and may be used to quickly compare expectation with reality\&.
56 .sp
57 Added in version 252\&.
58 .RE
59 .PP
60 \fBcalculate\fR
61 .RS 4
62 Pre\-calculate the expected values seen in PCR register 11 after boot\-up of a unified kernel image consisting of the components specified with
63 \fB\-\-linux=\fR,
64 \fB\-\-osrel=\fR,
65 \fB\-\-cmdline=\fR,
66 \fB\-\-initrd=\fR,
67 \fB\-\-ucode=\fR,
68 \fB\-\-splash=\fR,
69 \fB\-\-dtb=\fR,
70 \fB\-\-uname=\fR,
71 \fB\-\-sbat=\fR,
72 \fB\-\-pcrpkey=\fR,
73 \fB\-\-profile=\fR,
74 \fB\-\-dtbauto=\fR,
75 \fB\-\-hwids=\fR, see below\&. Only
76 \fB\-\-linux=\fR
77 is mandatory\&. (Alternatively, specify
78 \fB\-\-current\fR
79 to use the current values of PCR register 11 instead\&.)
80 .sp
81 Added in version 252\&.
82 .RE
83 .PP
84 \fBsign\fR
85 .RS 4
86 As with the
87 \fBcalculate\fR
88 command, pre\-calculate the expected value seen in TPM2 PCR register 11 after boot\-up of a unified kernel image\&. Then, cryptographically sign the resulting values with the private/public key pair (RSA) configured via
89 \fB\-\-private\-key=\fR
90 and
91 \fB\-\-public\-key=\fR\&. This will write a JSON object to standard output that contains signatures for all specified PCR banks (see the
92 \fB\-\-bank=\fR
93 option below), which may be used to unlock encrypted credentials (see
94 \fBsystemd-creds\fR(1)) or LUKS volumes (see
95 \[email protected]\fR(8))\&. This allows binding secrets to a set of kernels for which such PCR 11 signatures can be provided\&.
96 .sp
97 Note that a TPM2 device must be available for this signing to take place, even though the result is not tied to any TPM2 device or its state\&.
98 .sp
99 Added in version 252\&.
100 .RE
101 .PP
102 \fBpolicy\-digest\fR
103 .RS 4
104 As with the
105 \fBsign\fR
106 command, pre\-calculate the expected value seen in TPM2 PCR register 11 after boot\-up of a unified kernel image\&. Then, compute the resulting TPM2 policy and print its digest\&. This will write a JSON object to standard output that contains the policy digests for all specified PCR banks (see the
107 \fB\-\-bank=\fR
108 option below), so that it may be signed offline, for the cases where the private key is not directly accessible\&. If
109 \fB\-\-public\-key=\fR
110 or
111 \fB\-\-certificate=\fR
112 are specified, the JSON object will also contain the key fingerprint\&.
113 .sp
114 Added in version 258\&.
115 .RE
116 .SH "OPTIONS"
117 .PP
118 The following options are understood:
119 .PP
120 \fB\-\-linux=\fR\fB\fIPATH\fR\fR, \fB\-\-osrel=\fR\fB\fIPATH\fR\fR, \fB\-\-cmdline=\fR\fB\fIPATH\fR\fR, \fB\-\-initrd=\fR\fB\fIPATH\fR\fR, \fB\-\-ucode=\fR\fB\fIPATH\fR\fR, \fB\-\-splash=\fR\fB\fIPATH\fR\fR, \fB\-\-dtb=\fR\fB\fIPATH\fR\fR, \fB\-\-uname=\fR\fB\fIPATH\fR\fR, \fB\-\-sbat=\fR\fB\fIPATH\fR\fR, \fB\-\-pcrpkey=\fR\fB\fIPATH\fR\fR, \fB\-\-profile=\fR\fB\fIPATH\fR\fR, \fB\-\-dtbauto=\fR\fB\fIPATH\fR\fR, \fB\-\-hwids=\fR\fB\fIPATH\fR\fR
121 .RS 4
122 When used with the
123 \fBcalculate\fR
124 or
125 \fBsign\fR
126 verb, configures the files to read the unified kernel image components from\&. Each option corresponds with the equally named section in the unified kernel PE file\&. The
127 \fB\-\-linux=\fR
128 switch expects the path to the ELF kernel file that the unified PE kernel will wrap\&. All switches except
129 \fB\-\-linux=\fR
130 are optional\&. Each option may be used at most once\&.
131 .sp
132 Added in version 252\&.
133 .sp
134 With the exception of
135 \fB\-\-profile=\fR,
136 \fB\-\-dtbauto=\fR
137 and
138 \fB\-\-hwids=\fR, which have been added in version 257\&.
139 .RE
140 .PP
141 \fB\-\-current\fR
142 .RS 4
143 When used with the
144 \fBcalculate\fR
145 or
146 \fBsign\fR
147 verb, takes the PCR 11 values currently in effect for the system (which should typically reflect the hashes of the currently booted kernel)\&. This can be used in place of
148 \fB\-\-linux=\fR
149 and the other switches listed above\&.
150 .sp
151 Added in version 252\&.
152 .RE
153 .PP
154 \fB\-\-bank=\fR\fB\fIDIGEST\fR\fR
155 .RS 4
156 Controls the PCR banks to pre\-calculate the PCR values for \(en in case
157 \fBcalculate\fR
158 or
159 \fBsign\fR
160 is invoked \(en, or the banks to show in the
161 \fBstatus\fR
162 output\&. May be used more then once to specify multiple banks\&. If not specified, defaults to the four banks
163 "sha1",
164 "sha256",
165 "sha384",
166 "sha512"\&.
167 .sp
168 Note that some operating systems disable support for SHA1\-based signatures, in which case this operation will fail\&. Please consult your OS\*(Aq documentation for details on how to override the OS security policy around this\&.
169 .sp
170 Added in version 252\&.
171 .RE
172 .PP
173 \fB\-\-private\-key=\fR\fB\fIPATH\fR\fR, \fB\-\-public\-key=\fR\fB\fIPATH\fR\fR, \fB\-\-certificate=\fR\fB\fIPATH\fR\fR
174 .RS 4
175 These switches take paths to a pair of PEM encoded RSA key files, for use with the
176 \fBsign\fR
177 command\&.
178 .sp
179 Note the difference between the
180 \fB\-\-pcrpkey=\fR
181 and
182 \fB\-\-public\-key=\fR
183 switches\&. The former selects the data to include in the
184 "\&.pcrpkey"
185 PE section of the unified kernel image, the latter picks the public key of the key pair used to sign the resulting PCR 11 values\&. The former is the key that the booted system will likely use to lock disk and credential encryption to, the latter is the key used for unlocking such resources again\&. Hence, typically the same PEM key should be supplied in both cases\&.
186 .sp
187 If the
188 \fB\-\-public\-key=\fR
189 is not specified but
190 \fB\-\-private\-key=\fR
191 is specified, the public key is automatically derived from the private key\&.
192 .sp
193 \fB\-\-certificate=\fR
194 can be used to specify an X\&.509 certificate as an alternative to
195 \fB\-\-public\-key=\fR
196 since v256\&.
197 .sp
198 Added in version 252\&.
199 .RE
200 .PP
201 \fB\-\-private\-key=\fR\fB\fIPATH/URI\fR\fR, \fB\-\-private\-key\-source=\fR\fB\fITYPE\fR\fR\fB[:\fR\fB\fINAME\fR\fR\fB]\fR, \fB\-\-certificate=\fR\fB\fIPATH/URI\fR\fR, \fB\-\-certificate\-source=\fR\fB\fITYPE\fR\fR\fB[:\fR\fB\fINAME\fR\fR\fB]\fR
202 .RS 4
203 As an alternative to
204 \fB\-\-public\-key=\fR
205 for the
206 \fBsign\fR
207 command, these switches can be used to sign with an hardware token\&. The private key option can take a path or a URI that will be passed to the OpenSSL engine or provider, as specified by
208 \fB\-\-private\-key\-source=\fR
209 as a type:name tuple, such as engine:pkcs11\&. The specified OpenSSL signing engine or provider will be used to sign\&.
210 .sp
211 The
212 \fB\-\-certificate=\fR
213 option also takes a path or a URI that will be passed to the OpenSSL provider, as specified by
214 \fB\-\-certificate\-source=\fR
215 as a
216 "type:name"
217 tuple, such as
218 "provider:pkcs11"\&. Note that unlike
219 \fB\-\-private\-key\-source=\fR
220 this option only supports providers and not engines\&.
221 .sp
222 Added in version 256\&.
223 .RE
224 .PP
225 \fB\-\-tpm2\-device=\fR\fB\fIPATH\fR\fR
226 .RS 4
227 Controls which TPM2 device to use\&. Expects a device node path referring to the TPM2 chip (e\&.g\&.
228 /dev/tpmrm0)\&. Alternatively the special value
229 "auto"
230 may be specified, in order to automatically determine the device node of a suitable TPM2 device (of which there must be exactly one)\&. The special value
231 "list"
232 may be used to enumerate all suitable TPM2 devices currently discovered\&.
233 .sp
234 Added in version 252\&.
235 .RE
236 .PP
237 \fB\-\-phase=\fR\fB\fIPHASE\fR\fR
238 .RS 4
239 Controls which boot phases to calculate expected PCR 11 values for\&. This takes a series of colon\-separated strings that encode boot "paths" for entering a specific phase of the boot process\&. Each of the specified strings is measured by the
240 systemd\-pcrphase\-initrd\&.service,
241 systemd\-pcrphase\-sysinit\&.service, and
242 \fBsystemd-pcrphase.service\fR(8)
243 into PCR 11 during different milestones of the boot process\&. This switch may be specified multiple times to calculate PCR values for multiple boot phases at once\&. If not used defaults to
244 "enter\-initrd",
245 "enter\-initrd:leave\-initrd",
246 "enter\-initrd:leave\-initrd:sysinit",
247 "enter\-initrd:leave\-initrd:sysinit:ready", i\&.e\&. calculates expected PCR values for the boot phase in the initrd, during early boot, during later boot, and during system runtime, but excluding the phases before the initrd or when shutting down\&. This setting is honoured both by
248 \fBcalculate\fR
249 and
250 \fBsign\fR\&. When used with the latter it is particularly useful for generating PCR signatures that can only be used for unlocking resources during specific parts of the boot process\&.
251 .sp
252 For further details about PCR boot phases, see
253 \fBsystemd-pcrphase.service\fR(8)\&.
254 .sp
255 Added in version 252\&.
256 .RE
257 .PP
258 \fB\-\-append=\fR\fB\fIPATH\fR\fR
259 .RS 4
260 When generating a PCR JSON signature (via the
261 \fBsign\fR
262 command), combine it with a previously generated PCR JSON signature, and output it as one\&. The specified path must refer to a regular file that contains a valid JSON PCR signature object\&. The specified file is not modified\&. It will be read first, then the newly generated signature appended to it, and the resulting object is written to standard output\&. Use this to generate a single JSON object consisting from signatures made with a number of signing keys (for example, to have one key per boot phase)\&. The command will suppress duplicates: if a specific signature is already included in a JSON signature object it is not added a second time\&.
263 .sp
264 Added in version 253\&.
265 .RE
266 .PP
267 \fB\-\-json=\fR\fB\fIMODE\fR\fR
268 .RS 4
269 Shows output formatted as JSON\&. Expects one of
270 "short"
271 (for the shortest possible output without any redundant whitespace or line breaks),
272 "pretty"
273 (for a pretty version of the same, with indentation and line breaks) or
274 "off"
275 (to turn off JSON output, the default)\&.
276 .RE
277 .PP
278 \fB\-\-no\-pager\fR
279 .RS 4
280 Do not pipe output into a pager\&.
281 .RE
282 .PP
283 \fB\-h\fR, \fB\-\-help\fR
284 .RS 4
285 Print a short help text and exit\&.
286 .RE
287 .PP
288 \fB\-\-version\fR
289 .RS 4
290 Print a short version string and exit\&.
291 .RE
292 .SH "EXAMPLES"
293 .PP
294 \fBExample\ \&1.\ \&Generate a unified kernel image, and calculate the expected TPM PCR 11 value\fR
295 .sp
296 .if n \{\
297 .RS 4
298 .\}
299 .nf
300 $ ukify build \e
301 \-\-linux=vmlinux \e
302 \-\-initrd=initrd\&.cpio \e
303 \-\-os\-release=@os\-release\&.txt \e
304 \-\-cmdline=@cmdline\&.txt \e
305 \-\-splash=splash\&.bmp \e
306 \-\-devicetree=devicetree\&.dtb \e
307 \-\-measure \e
308 \-\-output=vmlinux\&.efi
309 11:sha1=d775a7b4482450ac77e03ee19bda90bd792d6ec7
310 11:sha256=bc6170f9ce28eb051ab465cd62be8cf63985276766cf9faf527ffefb66f45651
311 11:sha384=1cf67dff4757e61e5\&.\&.\&.7f49ad720be02fd07263e1f93061243aec599d1ee4b4
312 11:sha512=8e79acd3ddbbc8282\&.\&.\&.0c3e8ec0c714821032038f525f744960bcd082d937da
313 .fi
314 .if n \{\
315 .RE
316 .\}
317 .PP
318 \fBukify\fR(1)
319 internally calls
320 \fBsystemd\-measure\fR\&. The output with hashes is from
321 \fBsystemd\-measure\fR\&.
322 .PP
323 \fBExample\ \&2.\ \&Generate a private/public key pair, a unified kernel image, and a TPM PCR 11 signature for it, and embed the signature and the public key in the image\fR
324 .sp
325 .if n \{\
326 .RS 4
327 .\}
328 .nf
329 $ openssl genpkey \-algorithm RSA \-pkeyopt rsa_keygen_bits:2048 \-out tpm2\-pcr\-private\-key\&.pem
330 \&.\&.+\&.+++++++++\&.\&.\&.\&.\&.\&.+\&.\&.\&.\&.\&.\&.\&.\&.\&.+\&.\&.\&.\&.\&.\&.+\&.\&.\&.\&.\&.\&.\&.+\&.\&.\&.\&.+\&.\&.\&.\&.\&.+\&.+\&.\&.\&.+\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.
331 $ openssl rsa \-pubout \-in tpm2\-pcr\-private\-key\&.pem \-out tpm2\-pcr\-public\-key\&.pem
332 $ systemd\-measure sign \e
333 \-\-linux=vmlinux \e
334 \-\-osrel=os\-release\&.txt \e
335 \-\-cmdline=cmdline\&.txt \e
336 \-\-initrd=initrd\&.cpio \e
337 \-\-splash=splash\&.bmp \e
338 \-\-dtb=devicetree\&.dtb \e
339 \-\-pcrpkey=tpm2\-pcr\-public\-key\&.pem \e
340 \-\-bank=sha1 \e
341 \-\-bank=sha256 \e
342 \-\-private\-key=tpm2\-pcr\-private\-key\&.pem \e
343 \-\-public\-key=tpm2\-pcr\-public\-key\&.pem >tpm2\-pcr\-signature\&.json
344 $ ukify build \e
345 \-\-linux=vmlinux \e
346 \-\-initrd=initrd\&.cpio \e
347 \-\-os\-release=@os\-release\&.txt \e
348 \-\-cmdline=@cmdline\&.txt \e
349 \-\-splash=splash\&.bmp \e
350 \-\-devicetree=devicetree\&.dtb \e
351 \-\-pcr\-private\-key=tpm2\-pcr\-private\-key\&.pem \e
352 \-\-pcr\-public\-key=tpm2\-pcr\-public\-key\&.pem \e
353 \-\-pcr\-banks=sha1,sha256 \e
354 \-\-output=vmlinuz\&.efi
355 .fi
356 .if n \{\
357 .RE
358 .\}
359 .PP
360 Later on, enroll the signed PCR policy on a LUKS volume:
361 .sp
362 .if n \{\
363 .RS 4
364 .\}
365 .nf
366 # systemd\-cryptenroll \-\-tpm2\-device=auto \e
367 \-\-tpm2\-public\-key=tpm2\-pcr\-public\-key\&.pem \e
368 \-\-tpm2\-signature=tpm2\-pcr\-signature\&.json \e
369 /dev/sda5
370 .fi
371 .if n \{\
372 .RE
373 .\}
374 .PP
375 And then unlock the device with the signature:
376 .sp
377 .if n \{\
378 .RS 4
379 .\}
380 .nf
381 # systemd\-cryptsetup attach \e
382 volume5 /dev/sda5 \- \e
383 tpm2\-device=auto,tpm2\-signature=/path/to/tpm2\-pcr\-signature\&.json
384 .fi
385 .if n \{\
386 .RE
387 .\}
388 .PP
389 Note that when the generated unified kernel image
390 vmlinux\&.efi
391 is booted, the signature and public key files will be placed at locations
392 \fBsystemd\-cryptenroll\fR
393 and
394 \fBsystemd\-cryptsetup\fR
395 will look for anyway, and thus these paths do not actually need to be specified\&.
396 .PP
397 \fBExample\ \&3.\ \&Introduce a second public key, signing the same kernel PCR measurements, but only for the initrd boot phase\fR
398 .PP
399 This example extends the previous one, but we now introduce a second signing key that is only used to sign PCR policies restricted to the initrd boot phase\&. This can be used to lock down root volumes in a way that they can only be unlocked before the transition to the host system\&. Thus we have two classes of secrets or credentials: one that can be unlocked during the entire runtime, and the other that can only be used in the initrd\&.
400 .sp
401 .if n \{\
402 .RS 4
403 .\}
404 .nf
405 $ openssl genpkey \-algorithm RSA \-pkeyopt rsa_keygen_bits:2048 \-out tpm2\-pcr\-private\-key\&.pem
406 \&.+\&.\&.\&.\&.\&.\&.\&.\&.+\&.+\&.\&.\&.\&.\&.\&.\&.\&.+\&.\&.\&.\&.\&.\&.\&.+\&.\&.\&.+\&.\&.\&.+\&.\&.\&.\&.\&.\&.\&.\&.+\&.\&.\&.\&.+\&.\&.\&.\&.\&.\&.+\&.\&.+\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.
407 $ openssl rsa \-pubout \-in tpm2\-pcr\-private\-key\&.pem \-out tpm2\-pcr\-public\-key\&.pem
408 $ openssl genpkey \-algorithm RSA \-pkeyopt rsa_keygen_bits:2048 \-out tpm2\-pcr\-initrd\-private\-key\&.pem
409 \&.\&.+\&.\&.\&.\&.\&.\&.\&.++\&.\&.\&.\&.\&.\&.\&.\&.+\&.\&.\&.\&.\&.\&.\&.\&.+\&.\&.\&.\&.\&.\&.+\&.\&.\&.\&.\&.\&.\&.\&.+\&.\&.\&.\&.+\&.\&.\&.\&.\&.+\&.+\&.\&.+\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.
410 $ openssl rsa \-pubout \-in tpm2\-pcr\-initrd\-private\-key\&.pem \-out tpm2\-pcr\-initrd\-public\-key\&.pem
411 $ ukify build \e
412 \-\-linux=vmlinux\-1\&.2\&.3 \e
413 \-\-initrd=initrd\&.cpio \e
414 \-\-os\-release=@os\-release\&.txt \e
415 \-\-cmdline=@cmdline\&.txt \e
416 \-\-splash=splash\&.bmp \e
417 \-\-devicetree=devicetree\&.dtb \e
418 \-\-pcr\-private\-key=tpm2\-pcr\-private\-key\&.pem \e
419 \-\-pcr\-public\-key=tpm2\-pcr\-public\-key\&.pem \e
420 \-\-phases=enter\-initrd,enter\-initrd:leave\-initrd,enter\-initrd:leave\-initrd:sysinit,enter\-initrd:leave\-initrd:sysinit:ready \e
421 \-\-pcr\-banks=sha1,sha256 \e
422 \-\-pcr\-private\-key=tpm2\-pcr\-initrd\-private\-key\&.pem \e
423 \-\-pcr\-public\-key=tpm2\-pcr\-initrd\-public\-key\&.pem \e
424 \-\-phases=enter\-initrd \e
425 \-\-uname=1\&.2\&.3 \e
426 \-\-output=vmlinux\-1\&.2\&.3\&.efi
427 + /usr/lib/systemd/systemd\-measure sign \-\-linux=vmlinux\-1\&.2\&.3 \e
428 \-\-osrel=os\-release\&.txt \-\-cmdline=cmdline\&.txt \-\-dtb=devicetree\&.dtb \e
429 \-\-splash=splash\&.bmp \-\-initrd=initrd\&.cpio \-\-bank=sha1 \-\-bank=sha256 \e
430 \-\-private\-key=tpm2\-pcr\-private\-key\&.pem \-\-public\-key=tpm2\-pcr\-public\-key\&.pem \e
431 \-\-phase=enter\-initrd \-\-phase=enter\-initrd:leave\-initrd \e
432 \-\-phase=enter\-initrd:leave\-initrd:sysinit \e
433 \-\-phase=enter\-initrd:leave\-initrd:sysinit:ready
434 + /usr/lib/systemd/systemd\-measure sign \-\-linux=vmlinux\-1\&.2\&.3 \e
435 \-\-osrel=os\-release\&.txt \-\-cmdline=cmdline\&.txt \-\-dtb=devicetree\&.dtb \e
436 \-\-splash=splash\&.bmp \-\-initrd=initrd\&.cpio \-\-bank=sha1 \-\-bank=sha256 \e
437 \-\-private\-key=tpm2\-pcr\-initrd\-private\-key\&.pem \e
438 \-\-public\-key=tpm2\-pcr\-initrd\-public\-key\&.pem \e
439 \-\-phase=enter\-initrd
440 Wrote unsigned vmlinux\-1\&.2\&.3\&.efi
441 .fi
442 .if n \{\
443 .RE
444 .\}
445 .PP
446 \fBukify\fR
447 prints out both invocations of
448 \fBsystemd\-measure\fR
449 as informative output (the lines starting with
450 "+"); this allows us to see how
451 \fBsystemd\-measure\fR
452 is called\&. It then merges the output of both invocations into the
453 "\&.pcrsig"
454 section\&.
455 \fBsystemd\-measure\fR
456 may also do this merge itself using the
457 \fB\-\-append=\fR
458 option\&.
459 .PP
460 Note that in this example the
461 "\&.pcrpkey"
462 PE section contains the key specified by the first
463 \fB\-\-pcr\-private\-key=\fR
464 option, covering all boot phases\&. The
465 "\&.pcrpkey"
466 section is used in the default policies of
467 \fBsystemd\-cryptenroll\fR
468 and
469 \fBsystemd\-creds\fR\&. To use the stricter policy bound to
470 tpm2\-pcr\-initrd\-public\-key\&.pem, specify
471 \fB\-\-tpm2\-public\-key=\fR
472 on the command line of those tools\&.
473 .SH "EXIT STATUS"
474 .PP
475 On success, 0 is returned, a non\-zero failure code otherwise\&.
476 .SH "SEE ALSO"
477 .PP
478 \fBsystemd\fR(1), \fBsystemd-stub\fR(7), \fBukify\fR(1), \fBsystemd-creds\fR(1), \[email protected]\fR(8), \fBsystemd-pcrphase.service\fR(8)
479 .SH "NOTES"
480 .IP " 1." 4
481 UAPI.5 Unified Kernel Image (UKI)
482 .RS 4
483 \%https://uapi-group.org/specifications/specs/unified_kernel_image/
484 .RE