1use crate::{
6 data::{
7 Tpm2bAttest, Tpm2bAuth, Tpm2bCreationData, Tpm2bData, Tpm2bDigest, Tpm2bEccParameter,
8 Tpm2bEccPoint, Tpm2bEncryptedSecret, Tpm2bEvent, Tpm2bIdObject, Tpm2bIv, Tpm2bMaxBuffer,
9 Tpm2bMaxNvBuffer, Tpm2bName, Tpm2bNonce, Tpm2bNvPublic, Tpm2bPrivate, Tpm2bPublic,
10 Tpm2bPublicKeyRsa, Tpm2bSensitive, Tpm2bSensitiveCreate, Tpm2bSensitiveData, Tpm2bTemplate,
11 Tpm2bTimeout, TpmAlgId, TpmAt, TpmCap, TpmCc, TpmClockAdjust, TpmEccCurve, TpmEo, TpmRh,
12 TpmSe, TpmSu, TpmaLocality, TpmiAlgCipherMode, TpmiAlgHash, TpmiEccKeyExchange, TpmiYesNo,
13 TpmlAcCapabilities, TpmlAlg, TpmlCc, TpmlDigest, TpmlDigestValues, TpmlPcrSelection,
14 TpmsAcOutput, TpmsAlgorithmDetailEcc, TpmsCapabilityData, TpmsContext, TpmsTimeInfo,
15 TpmtHa, TpmtKdfScheme, TpmtPublicParms, TpmtRsaDecrypt, TpmtSignature, TpmtSymDef,
16 TpmtSymDefObject, TpmtTkAuth, TpmtTkCreation, TpmtTkHashcheck, TpmtTkVerified,
17 },
18 frame::TpmHeader,
19 tpm_struct, TpmHandle,
20};
21use core::fmt::Debug;
22
23tpm_struct! {
24 #[derive(Debug, PartialEq, Eq, Clone)]
25 kind: Command,
26 name: TpmAcGetCapabilityCommand,
27 cc: TpmCc::AcGetCapability,
28 handles: 1,
29 parameters: {
30 pub capability: TpmAt,
31 pub count: u32,
32 }
33}
34
35tpm_struct! {
36 #[derive(Debug, PartialEq, Eq, Clone)]
37 kind: Response,
38 name: TpmAcGetCapabilityResponse,
39 cc: TpmCc::AcGetCapability,
40 handles: 0,
41 parameters: {
42 pub more_data: TpmiYesNo,
43 pub capabilities_data: TpmlAcCapabilities,
44 }
45}
46
47tpm_struct! {
48 #[derive(Debug, PartialEq, Eq, Clone)]
49 kind: Command,
50 name: TpmAcSendCommand,
51 cc: TpmCc::AcSend,
52 handles: 3,
53 parameters: {
54 pub ac_data_in: Tpm2bMaxBuffer,
55 }
56}
57
58tpm_struct! {
59 #[derive(Debug, PartialEq, Eq, Clone)]
60 kind: Response,
61 name: TpmAcSendResponse,
62 cc: TpmCc::AcSend,
63 handles: 0,
64 parameters: {
65 pub ac_data_out: TpmsAcOutput,
66 }
67}
68
69tpm_struct! {
70 #[derive(Debug, PartialEq, Eq, Clone)]
71 kind: Command,
72 name: TpmActivateCredentialCommand,
73 cc: TpmCc::ActivateCredential,
74 handles: 2,
75 parameters: {
76 pub credential_blob: Tpm2bIdObject,
77 pub secret: Tpm2bEncryptedSecret,
78 }
79}
80
81tpm_struct! {
82 #[derive(Debug, PartialEq, Eq, Clone)]
83 kind: Response,
84 name: TpmActivateCredentialResponse,
85 cc: TpmCc::ActivateCredential,
86 handles: 0,
87 parameters: {
88 pub cert_info: Tpm2bDigest,
89 }
90}
91
92tpm_struct! {
93 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
94 kind: Command,
95 name: TpmActSetTimeoutCommand,
96 cc: TpmCc::ActSetTimeout,
97 handles: 1,
98 parameters: {
99 pub start_timeout: u32,
100 }
101}
102
103tpm_struct! {
104 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
105 kind: Response,
106 name: TpmActSetTimeoutResponse,
107 cc: TpmCc::ActSetTimeout,
108 handles: 0,
109 parameters: {}
110}
111
112tpm_struct! {
113 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
114 kind: Command,
115 name: TpmChangeEpsCommand,
116 cc: TpmCc::ChangeEps,
117 handles: 1,
118 parameters: {}
119}
120
121tpm_struct! {
122 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
123 kind: Response,
124 name: TpmChangeEpsResponse,
125 cc: TpmCc::ChangeEps,
126 handles: 0,
127 parameters: {}
128}
129
130tpm_struct! {
131 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
132 kind: Command,
133 name: TpmChangePpsCommand,
134 cc: TpmCc::ChangePps,
135 handles: 1,
136 parameters: {}
137}
138
139tpm_struct! {
140 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
141 kind: Response,
142 name: TpmChangePpsResponse,
143 cc: TpmCc::ChangePps,
144 handles: 0,
145 parameters: {}
146}
147
148tpm_struct! {
149 #[derive(Debug, PartialEq, Eq, Clone)]
150 kind: Command,
151 name: TpmCertifyCommand,
152 cc: TpmCc::Certify,
153 handles: 2,
154 parameters: {
155 pub qualifying_data: Tpm2bData,
156 pub in_scheme: TpmtSignature,
157 }
158}
159
160tpm_struct! {
161 #[derive(Debug, PartialEq, Eq, Clone)]
162 kind: Response,
163 name: TpmCertifyResponse,
164 cc: TpmCc::Certify,
165 handles: 0,
166 parameters: {
167 pub certify_info: Tpm2bAttest,
168 pub signature: TpmtSignature,
169 }
170}
171
172tpm_struct! {
173 #[derive(Debug, PartialEq, Eq, Clone)]
174 kind: Command,
175 name: TpmCertifyCreationCommand,
176 cc: TpmCc::CertifyCreation,
177 handles: 2,
178 parameters: {
179 pub qualifying_data: Tpm2bData,
180 pub creation_hash: Tpm2bDigest,
181 pub in_scheme: TpmtSignature,
182 pub creation_ticket: TpmtTkCreation,
183 }
184}
185
186tpm_struct! {
187 #[derive(Debug, PartialEq, Eq, Clone)]
188 kind: Response,
189 name: TpmCertifyCreationResponse,
190 cc: TpmCc::CertifyCreation,
191 handles: 0,
192 parameters: {
193 pub certify_info: Tpm2bAttest,
194 pub signature: TpmtSignature,
195 }
196}
197
198tpm_struct! {
199 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
200 kind: Command,
201 name: TpmClearCommand,
202 cc: TpmCc::Clear,
203 handles: 1,
204 parameters: {}
205}
206
207tpm_struct! {
208 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
209 kind: Response,
210 name: TpmClearResponse,
211 cc: TpmCc::Clear,
212 handles: 0,
213 parameters: {}
214}
215
216tpm_struct! {
217 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
218 kind: Command,
219 name: TpmClearControlCommand,
220 cc: TpmCc::ClearControl,
221 handles: 1,
222 parameters: {
223 pub disable: TpmiYesNo,
224 }
225}
226
227tpm_struct! {
228 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
229 kind: Response,
230 name: TpmClearControlResponse,
231 cc: TpmCc::ClearControl,
232 handles: 0,
233 parameters: {}
234}
235
236tpm_struct! {
237 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
238 kind: Command,
239 name: TpmClockRateAdjustCommand,
240 cc: TpmCc::ClockRateAdjust,
241 handles: 1,
242 parameters: {
243 pub rate_adjust: TpmClockAdjust,
244 }
245}
246
247tpm_struct! {
248 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
249 kind: Response,
250 name: TpmClockRateAdjustResponse,
251 cc: TpmCc::ClockRateAdjust,
252 handles: 0,
253 parameters: {}
254}
255
256tpm_struct! {
257 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
258 kind: Command,
259 name: TpmClockSetCommand,
260 cc: TpmCc::ClockSet,
261 handles: 1,
262 parameters: {
263 pub new_time: u64,
264 }
265}
266
267tpm_struct! {
268 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
269 kind: Response,
270 name: TpmClockSetResponse,
271 cc: TpmCc::ClockSet,
272 handles: 0,
273 parameters: {}
274}
275
276tpm_struct! {
277 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
278 kind: Command,
279 name: TpmCommitCommand,
280 cc: TpmCc::Commit,
281 handles: 1,
282 parameters: {
283 pub p1: Tpm2bEccPoint,
284 pub s2: Tpm2bSensitiveData,
285 pub y2: Tpm2bEccParameter,
286 }
287}
288
289tpm_struct! {
290 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
291 kind: Response,
292 name: TpmCommitResponse,
293 cc: TpmCc::Commit,
294 handles: 0,
295 parameters: {
296 pub k: Tpm2bEccPoint,
297 pub l: Tpm2bEccPoint,
298 pub e: Tpm2bEccPoint,
299 pub counter: u16,
300 }
301}
302
303tpm_struct! {
304 #[derive(Debug, PartialEq, Eq, Clone)]
305 kind: Command,
306 name: TpmContextLoadCommand,
307 cc: TpmCc::ContextLoad,
308 handles: 0,
309 parameters: {
310 pub context: TpmsContext,
311 }
312}
313
314tpm_struct! {
315 #[derive(Debug, PartialEq, Eq, Clone)]
316 kind: Response,
317 name: TpmContextLoadResponse,
318 cc: TpmCc::ContextLoad,
319 handles: 1,
320 parameters: {}
321}
322
323tpm_struct! {
324 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
325 kind: Command,
326 name: TpmContextSaveCommand,
327 cc: TpmCc::ContextSave,
328 handles: 1,
329 parameters: {}
330}
331
332tpm_struct! {
333 #[derive(Debug, PartialEq, Eq, Clone)]
334 kind: Response,
335 name: TpmContextSaveResponse,
336 cc: TpmCc::ContextSave,
337 handles: 0,
338 parameters: {
339 pub context: TpmsContext,
340 }
341}
342
343tpm_struct! {
344 #[derive(Debug, PartialEq, Eq, Clone)]
345 kind: Command,
346 name: TpmCreateCommand,
347 cc: TpmCc::Create,
348 handles: 1,
349 parameters: {
350 pub in_sensitive: Tpm2bSensitiveCreate,
351 pub in_public: Tpm2bPublic,
352 pub outside_info: Tpm2bData,
353 pub creation_pcr: TpmlPcrSelection,
354 }
355}
356
357tpm_struct! {
358 #[derive(Debug, PartialEq, Eq, Clone)]
359 kind: Response,
360 name: TpmCreateResponse,
361 cc: TpmCc::Create,
362 handles: 0,
363 parameters: {
364 pub out_private: Tpm2bPrivate,
365 pub out_public: Tpm2bPublic,
366 pub creation_data: Tpm2bCreationData,
367 pub creation_hash: Tpm2bDigest,
368 pub creation_ticket: TpmtTkCreation,
369 }
370}
371
372tpm_struct! {
373 #[derive(Debug, PartialEq, Eq, Clone)]
374 kind: Command,
375 name: TpmCreateLoadedCommand,
376 cc: TpmCc::CreateLoaded,
377 handles: 1,
378 parameters: {
379 pub in_sensitive: Tpm2bSensitiveCreate,
380 pub in_public: Tpm2bTemplate,
381 }
382}
383
384tpm_struct! {
385 #[derive(Debug, PartialEq, Eq, Clone)]
386 kind: Response,
387 name: TpmCreateLoadedResponse,
388 cc: TpmCc::CreateLoaded,
389 handles: 1,
390 parameters: {
391 pub out_private: Tpm2bPrivate,
392 pub out_public: Tpm2bPublic,
393 pub name: Tpm2bName,
394 }
395}
396
397tpm_struct! {
398 #[derive(Debug, Default, PartialEq, Eq, Clone)]
399 kind: Command,
400 name: TpmCreatePrimaryCommand,
401 cc: TpmCc::CreatePrimary,
402 handles: 1,
403 parameters: {
404 pub in_sensitive: Tpm2bSensitiveCreate,
405 pub in_public: Tpm2bPublic,
406 pub outside_info: Tpm2bData,
407 pub creation_pcr: TpmlPcrSelection,
408 }
409}
410
411tpm_struct! {
412 #[derive(Debug, PartialEq, Eq, Clone)]
413 kind: Response,
414 name: TpmCreatePrimaryResponse,
415 cc: TpmCc::CreatePrimary,
416 handles: 1,
417 parameters: {
418 pub out_public: Tpm2bPublic,
419 pub creation_data: Tpm2bCreationData,
420 pub creation_hash: Tpm2bDigest,
421 pub creation_ticket: TpmtTkCreation,
422 pub name: Tpm2bName,
423 }
424}
425
426tpm_struct! {
427 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
428 kind: Command,
429 name: TpmDictionaryAttackLockResetCommand,
430 cc: TpmCc::DictionaryAttackLockReset,
431 handles: 1,
432 parameters: {}
433}
434
435tpm_struct! {
436 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
437 kind: Response,
438 name: TpmDictionaryAttackLockResetResponse,
439 cc: TpmCc::DictionaryAttackLockReset,
440 handles: 0,
441 parameters: {}
442}
443
444tpm_struct! {
445 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
446 kind: Command,
447 name: TpmDictionaryAttackParametersCommand,
448 cc: TpmCc::DictionaryAttackParameters,
449 handles: 1,
450 parameters: {
451 pub new_max_tries: u32,
452 pub new_recovery_time: u32,
453 pub lockout_recovery: u32,
454 }
455}
456
457tpm_struct! {
458 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
459 kind: Response,
460 name: TpmDictionaryAttackParametersResponse,
461 cc: TpmCc::DictionaryAttackParameters,
462 handles: 0,
463 parameters: {}
464}
465
466tpm_struct! {
467 #[derive(Debug, PartialEq, Eq, Clone)]
468 kind: Command,
469 name: TpmDuplicateCommand,
470 cc: TpmCc::Duplicate,
471 handles: 2,
472 parameters: {
473 pub encryption_key_in: Tpm2bData,
474 pub symmetric_alg: TpmtSymDefObject,
475 }
476}
477
478tpm_struct! {
479 #[derive(Debug, PartialEq, Eq, Clone)]
480 kind: Response,
481 name: TpmDuplicateResponse,
482 cc: TpmCc::Duplicate,
483 handles: 0,
484 parameters: {
485 pub encryption_key_out: Tpm2bData,
486 pub duplicate: Tpm2bPrivate,
487 pub out_sym_seed: Tpm2bEncryptedSecret,
488 }
489}
490
491tpm_struct! {
492 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
493 kind: Command,
494 name: TpmEccDecryptCommand,
495 cc: TpmCc::EccDecrypt,
496 handles: 1,
497 parameters: {
498 pub c1: Tpm2bEccPoint,
499 pub c2: crate::data::Tpm2bMaxBuffer,
500 pub c3: crate::data::Tpm2bDigest,
501 pub in_scheme: TpmtKdfScheme,
502 }
503}
504
505tpm_struct! {
506 #[derive(Debug, PartialEq, Eq, Clone)]
507 kind: Response,
508 name: TpmEccDecryptResponse,
509 cc: TpmCc::EccDecrypt,
510 handles: 0,
511 parameters: {
512 pub plaintext: crate::data::Tpm2bMaxBuffer,
513 }
514}
515
516tpm_struct! {
517 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
518 kind: Command,
519 name: TpmEcEphemeralCommand,
520 cc: TpmCc::EcEphemeral,
521 handles: 0,
522 parameters: {
523 pub curve_id: TpmEccCurve,
524 }
525}
526
527tpm_struct! {
528 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
529 kind: Response,
530 name: TpmEcEphemeralResponse,
531 cc: TpmCc::EcEphemeral,
532 handles: 0,
533 parameters: {
534 pub q: Tpm2bEccPoint,
535 pub counter: u16,
536 }
537}
538
539tpm_struct! {
540 #[derive(Debug, PartialEq, Eq, Clone)]
541 kind: Command,
542 name: TpmEccEncryptCommand,
543 cc: TpmCc::EccEncrypt,
544 handles: 1,
545 parameters: {
546 pub plaintext: Tpm2bMaxBuffer,
547 pub in_scheme: TpmtKdfScheme,
548 }
549}
550
551tpm_struct! {
552 #[derive(Debug, PartialEq, Eq, Clone)]
553 kind: Response,
554 name: TpmEccEncryptResponse,
555 cc: TpmCc::EccEncrypt,
556 handles: 0,
557 parameters: {
558 pub c1: Tpm2bEccPoint,
559 pub c2: crate::data::Tpm2bMaxBuffer,
560 pub c3: crate::data::Tpm2bDigest,
561 }
562}
563
564tpm_struct! {
565 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
566 kind: Command,
567 name: TpmEccParametersCommand,
568 cc: TpmCc::EccParameters,
569 handles: 0,
570 parameters: {
571 pub curve_id: TpmEccCurve,
572 }
573}
574
575tpm_struct! {
576 #[derive(Debug, PartialEq, Eq, Clone)]
577 kind: Response,
578 name: TpmEccParametersResponse,
579 cc: TpmCc::EccParameters,
580 handles: 0,
581 parameters: {
582 pub parameters: TpmsAlgorithmDetailEcc,
583 }
584}
585
586tpm_struct! {
587 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
588 kind: Command,
589 name: TpmEcdhKeyGenCommand,
590 cc: TpmCc::EcdhKeyGen,
591 handles: 1,
592 parameters: {}
593}
594
595tpm_struct! {
596 #[derive(Debug, PartialEq, Eq, Clone)]
597 kind: Response,
598 name: TpmEcdhKeyGenResponse,
599 cc: TpmCc::EcdhKeyGen,
600 handles: 0,
601 parameters: {
602 pub z_point: Tpm2bEccPoint,
603 pub pub_point: Tpm2bEccPoint,
604 }
605}
606
607tpm_struct! {
608 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
609 kind: Command,
610 name: TpmEcdhZGenCommand,
611 cc: TpmCc::EcdhZGen,
612 handles: 1,
613 parameters: {
614 pub in_point: Tpm2bEccPoint,
615 }
616}
617
618tpm_struct! {
619 #[derive(Debug, PartialEq, Eq, Clone)]
620 kind: Response,
621 name: TpmEcdhZGenResponse,
622 cc: TpmCc::EcdhZGen,
623 handles: 0,
624 parameters: {
625 pub out_point: Tpm2bEccPoint,
626 }
627}
628
629tpm_struct! {
630 #[derive(Debug, PartialEq, Eq, Clone)]
631 kind: Command,
632 name: TpmEncryptDecryptCommand,
633 cc: TpmCc::EncryptDecrypt,
634 handles: 1,
635 parameters: {
636 pub decrypt: TpmiYesNo,
637 pub mode: TpmiAlgCipherMode,
638 pub iv_in: Tpm2bIv,
639 pub in_data: Tpm2bMaxBuffer,
640 }
641}
642
643tpm_struct! {
644 #[derive(Debug, PartialEq, Eq, Clone)]
645 kind: Response,
646 name: TpmEncryptDecryptResponse,
647 cc: TpmCc::EncryptDecrypt,
648 handles: 0,
649 parameters: {
650 pub out_data: Tpm2bMaxBuffer,
651 pub iv_out: Tpm2bIv,
652 }
653}
654
655tpm_struct! {
656 #[derive(Debug, PartialEq, Eq, Clone)]
657 kind: Command,
658 name: TpmEncryptDecrypt2Command,
659 cc: TpmCc::EncryptDecrypt2,
660 handles: 1,
661 parameters: {
662 pub in_data: Tpm2bMaxBuffer,
663 pub decrypt: TpmiYesNo,
664 pub mode: TpmAlgId,
665 pub iv_in: Tpm2bIv,
666 }
667}
668
669tpm_struct! {
670 #[derive(Debug, PartialEq, Eq, Clone)]
671 kind: Response,
672 name: TpmEncryptDecrypt2Response,
673 cc: TpmCc::EncryptDecrypt2,
674 handles: 0,
675 parameters: {
676 pub out_data: Tpm2bMaxBuffer,
677 pub iv_out: Tpm2bIv,
678 }
679}
680
681tpm_struct! {
682 #[derive(Debug, PartialEq, Eq, Clone)]
683 kind: Command,
684 name: TpmEventSequenceCompleteCommand,
685 cc: TpmCc::EventSequenceComplete,
686 handles: 2,
687 parameters: {
688 pub buffer: Tpm2bMaxBuffer,
689 }
690}
691
692tpm_struct! {
693 #[derive(Debug, Default, PartialEq, Eq, Clone)]
694 kind: Response,
695 name: TpmEventSequenceCompleteResponse,
696 cc: TpmCc::EventSequenceComplete,
697 handles: 0,
698 parameters: {
699 pub results: TpmlDigestValues,
700 }
701}
702
703tpm_struct! {
704 #[derive(Debug, PartialEq, Eq, Clone)]
705 kind: Command,
706 name: TpmEvictControlCommand,
707 cc: TpmCc::EvictControl,
708 handles: 2,
709 parameters: {
710 pub persistent_handle: TpmHandle,
711 }
712}
713
714tpm_struct! {
715 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
716 kind: Response,
717 name: TpmEvictControlResponse,
718 cc: TpmCc::EvictControl,
719 handles: 0,
720 parameters: {}
721}
722
723tpm_struct! {
724 #[derive(Debug, PartialEq, Eq, Clone)]
725 kind: Command,
726 name: TpmFieldUpgradeDataCommand,
727 cc: TpmCc::FieldUpgradeData,
728 handles: 0,
729 parameters: {
730 pub fu_data: crate::data::Tpm2bMaxBuffer,
731 }
732}
733
734tpm_struct! {
735 #[derive(Debug, PartialEq, Eq, Clone)]
736 kind: Response,
737 name: TpmFieldUpgradeDataResponse,
738 cc: TpmCc::FieldUpgradeData,
739 handles: 0,
740 parameters: {
741 pub next_digest: TpmtHa,
742 pub first_digest: TpmtHa,
743 }
744}
745
746tpm_struct! {
747 #[derive(Debug, PartialEq, Eq, Clone)]
748 kind: Command,
749 name: TpmFieldUpgradeStartCommand,
750 cc: TpmCc::FieldUpgradeStart,
751 handles: 2,
752 parameters: {
753 pub fu_digest: Tpm2bDigest,
754 pub manifest_signature: TpmtSignature,
755 }
756}
757
758tpm_struct! {
759 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
760 kind: Response,
761 name: TpmFieldUpgradeStartResponse,
762 cc: TpmCc::FieldUpgradeStart,
763 handles: 0,
764 parameters: {}
765}
766
767tpm_struct! {
768 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
769 kind: Command,
770 name: TpmFirmwareReadCommand,
771 cc: TpmCc::FirmwareRead,
772 handles: 0,
773 parameters: {
774 pub sequence_number: u32,
775 }
776}
777
778tpm_struct! {
779 #[derive(Debug, PartialEq, Eq, Clone)]
780 kind: Response,
781 name: TpmFirmwareReadResponse,
782 cc: TpmCc::FirmwareRead,
783 handles: 0,
784 parameters: {
785 pub fu_data: crate::data::Tpm2bMaxBuffer,
786 }
787}
788
789tpm_struct! {
790 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
791 kind: Command,
792 name: TpmFlushContextCommand,
793 cc: TpmCc::FlushContext,
794 handles: 0,
795 parameters: {
796 pub flush_handle: TpmHandle,
797 }
798}
799
800tpm_struct! {
801 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
802 kind: Response,
803 name: TpmFlushContextResponse,
804 cc: TpmCc::FlushContext,
805 handles: 0,
806 parameters: {}
807}
808
809tpm_struct! {
810 #[derive(Debug, PartialEq, Eq, Clone)]
811 kind: Command,
812 name: TpmGetCapabilityCommand,
813 cc: TpmCc::GetCapability,
814 handles: 0,
815 parameters: {
816 pub cap: TpmCap,
817 pub property: u32,
818 pub property_count: u32,
819 }
820}
821
822tpm_struct! {
823 #[derive(Debug, PartialEq, Eq, Clone)]
824 kind: Response,
825 name: TpmGetCapabilityResponse,
826 cc: TpmCc::GetCapability,
827 handles: 0,
828 parameters: {
829 pub more_data: TpmiYesNo,
830 pub capability_data: TpmsCapabilityData,
831 }
832}
833
834tpm_struct! {
835 #[derive(Debug, PartialEq, Eq, Clone)]
836 kind: Command,
837 name: TpmGetCommandAuditDigestCommand,
838 cc: TpmCc::GetCommandAuditDigest,
839 handles: 2,
840 parameters: {
841 pub qualifying_data: Tpm2bData,
842 pub in_scheme: TpmtSignature,
843 }
844}
845
846tpm_struct! {
847 #[derive(Debug, PartialEq, Eq, Clone)]
848 kind: Response,
849 name: TpmGetCommandAuditDigestResponse,
850 cc: TpmCc::GetCommandAuditDigest,
851 handles: 0,
852 parameters: {
853 pub audit_info: Tpm2bAttest,
854 pub signature: TpmtSignature,
855 }
856}
857
858tpm_struct! {
859 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
860 kind: Command,
861 name: TpmGetRandomCommand,
862 cc: TpmCc::GetRandom,
863 handles: 0,
864 parameters: {
865 pub bytes_requested: u16,
866 }
867}
868
869tpm_struct! {
870 #[derive(Debug, Default, PartialEq, Eq, Clone)]
871 kind: Response,
872 name: TpmGetRandomResponse,
873 cc: TpmCc::GetRandom,
874 handles: 0,
875 parameters: {
876 pub random_bytes: Tpm2bDigest,
877 }
878}
879
880tpm_struct! {
881 #[derive(Debug, PartialEq, Eq, Clone)]
882 kind: Command,
883 name: TpmGetSessionAuditDigestCommand,
884 cc: TpmCc::GetSessionAuditDigest,
885 handles: 3,
886 parameters: {
887 pub qualifying_data: Tpm2bData,
888 pub in_scheme: TpmtSignature,
889 }
890}
891
892tpm_struct! {
893 #[derive(Debug, PartialEq, Eq, Clone)]
894 kind: Response,
895 name: TpmGetSessionAuditDigestResponse,
896 cc: TpmCc::GetSessionAuditDigest,
897 handles: 0,
898 parameters: {
899 pub audit_info: Tpm2bAttest,
900 pub signature: TpmtSignature,
901 }
902}
903
904tpm_struct! {
905 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
906 kind: Command,
907 name: TpmGetTestResultCommand,
908 cc: TpmCc::GetTestResult,
909 handles: 0,
910 parameters: {}
911}
912
913tpm_struct! {
914 #[derive(Debug, PartialEq, Eq, Clone)]
915 kind: Response,
916 name: TpmGetTestResultResponse,
917 cc: TpmCc::GetTestResult,
918 handles: 0,
919 parameters: {
920 pub out_data: Tpm2bMaxBuffer,
921 pub test_result: crate::data::TpmRc,
922 }
923}
924
925tpm_struct! {
926 #[derive(Debug, PartialEq, Eq, Clone)]
927 kind: Command,
928 name: TpmGetTimeCommand,
929 cc: TpmCc::GetTime,
930 handles: 2,
931 parameters: {
932 pub qualifying_data: Tpm2bData,
933 pub in_scheme: TpmtSignature,
934 }
935}
936
937tpm_struct! {
938 #[derive(Debug, PartialEq, Eq, Clone)]
939 kind: Response,
940 name: TpmGetTimeResponse,
941 cc: TpmCc::GetTime,
942 handles: 0,
943 parameters: {
944 pub time_info: Tpm2bAttest,
945 pub signature: TpmtSignature,
946 }
947}
948
949tpm_struct! {
950 #[derive(Debug, PartialEq, Eq, Clone)]
951 kind: Command,
952 name: TpmHashCommand,
953 cc: TpmCc::Hash,
954 handles: 0,
955 parameters: {
956 pub data: Tpm2bMaxBuffer,
957 pub hash_alg: TpmAlgId,
958 pub hierarchy: TpmRh,
959 }
960}
961
962tpm_struct! {
963 #[derive(Debug, PartialEq, Eq, Clone)]
964 kind: Response,
965 name: TpmHashResponse,
966 cc: TpmCc::Hash,
967 handles: 0,
968 parameters: {
969 pub out_hash: Tpm2bDigest,
970 pub validation: TpmtTkHashcheck,
971 }
972}
973
974tpm_struct! {
975 #[derive(Debug, PartialEq, Eq, Clone)]
976 kind: Command,
977 name: TpmHashSequenceStartCommand,
978 cc: TpmCc::HashSequenceStart,
979 handles: 0,
980 parameters: {
981 pub auth: Tpm2bAuth,
982 pub hash_alg: TpmAlgId,
983 }
984}
985
986tpm_struct! {
987 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
988 kind: Response,
989 name: TpmHashSequenceStartResponse,
990 cc: TpmCc::HashSequenceStart,
991 handles: 1,
992 parameters: {}
993}
994
995tpm_struct! {
996 #[derive(Debug, PartialEq, Eq, Clone)]
997 kind: Command,
998 name: TpmHierarchyChangeAuthCommand,
999 cc: TpmCc::HierarchyChangeAuth,
1000 handles: 1,
1001 parameters: {
1002 pub new_auth: Tpm2bAuth,
1003 }
1004}
1005
1006tpm_struct! {
1007 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1008 kind: Response,
1009 name: TpmHierarchyChangeAuthResponse,
1010 cc: TpmCc::HierarchyChangeAuth,
1011 handles: 0,
1012 parameters: {}
1013}
1014
1015tpm_struct! {
1016 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
1017 kind: Command,
1018 name: TpmHierarchyControlCommand,
1019 cc: TpmCc::HierarchyControl,
1020 handles: 1,
1021 parameters: {
1022 pub enable: TpmRh,
1023 pub state: TpmiYesNo,
1024 }
1025}
1026
1027tpm_struct! {
1028 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1029 kind: Response,
1030 name: TpmHierarchyControlResponse,
1031 cc: TpmCc::HierarchyControl,
1032 handles: 0,
1033 parameters: {}
1034}
1035
1036tpm_struct! {
1037 #[derive(Debug, PartialEq, Eq, Clone)]
1038 kind: Command,
1039 name: TpmHmacCommand,
1040 cc: TpmCc::Hmac,
1041 handles: 1,
1042 parameters: {
1043 pub buffer: Tpm2bMaxBuffer,
1044 pub hash_alg: TpmiAlgHash,
1045 }
1046}
1047
1048tpm_struct! {
1049 #[derive(Debug, PartialEq, Eq, Clone)]
1050 kind: Response,
1051 name: TpmHmacResponse,
1052 cc: TpmCc::Hmac,
1053 handles: 0,
1054 parameters: {
1055 pub out_hmac: Tpm2bDigest,
1056 }
1057}
1058
1059tpm_struct! {
1060 #[derive(Debug, PartialEq, Eq, Clone)]
1061 kind: Command,
1062 name: TpmHmacStartCommand,
1063 cc: TpmCc::HmacStart,
1064 handles: 1,
1065 parameters: {
1066 pub auth: Tpm2bAuth,
1067 pub hash_alg: TpmAlgId,
1068 }
1069}
1070
1071tpm_struct! {
1072 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
1073 kind: Response,
1074 name: TpmHmacStartResponse,
1075 cc: TpmCc::HmacStart,
1076 handles: 1,
1077 parameters: {}
1078}
1079
1080tpm_struct! {
1081 #[derive(Debug, PartialEq, Eq, Clone)]
1082 kind: Command,
1083 name: TpmImportCommand,
1084 cc: TpmCc::Import,
1085 handles: 1,
1086 parameters: {
1087 pub encryption_key: Tpm2bData,
1088 pub object_public: Tpm2bPublic,
1089 pub duplicate: Tpm2bPrivate,
1090 pub in_sym_seed: Tpm2bEncryptedSecret,
1091 pub symmetric_alg: TpmtSymDef,
1092 }
1093}
1094
1095tpm_struct! {
1096 #[derive(Debug, Default, PartialEq, Eq, Clone)]
1097 kind: Response,
1098 name: TpmImportResponse,
1099 cc: TpmCc::Import,
1100 handles: 0,
1101 parameters: {
1102 pub out_private: Tpm2bPrivate,
1103 }
1104}
1105
1106tpm_struct! {
1107 #[derive(Debug, PartialEq, Eq, Clone)]
1108 kind: Command,
1109 name: TpmIncrementalSelfTestCommand,
1110 cc: TpmCc::IncrementalSelfTest,
1111 handles: 0,
1112 parameters: {
1113 pub to_test: TpmlAlg,
1114 }
1115}
1116
1117tpm_struct! {
1118 #[derive(Debug, Default, PartialEq, Eq, Clone)]
1119 kind: Response,
1120 name: TpmIncrementalSelfTestResponse,
1121 cc: TpmCc::IncrementalSelfTest,
1122 handles: 0,
1123 parameters: {
1124 pub to_do_list: TpmlAlg,
1125 }
1126}
1127
1128tpm_struct! {
1129 #[derive(Debug, Default, PartialEq, Eq, Clone)]
1130 kind: Command,
1131 name: TpmLoadCommand,
1132 cc: TpmCc::Load,
1133 handles: 1,
1134 parameters: {
1135 pub in_private: Tpm2bPrivate,
1136 pub in_public: Tpm2bPublic,
1137 }
1138}
1139
1140tpm_struct! {
1141 #[derive(Debug, PartialEq, Eq, Clone)]
1142 kind: Response,
1143 name: TpmLoadResponse,
1144 cc: TpmCc::Load,
1145 handles: 1,
1146 parameters: {
1147 pub name: Tpm2bName,
1148 }
1149}
1150
1151tpm_struct! {
1152 #[derive(Debug, PartialEq, Eq, Clone)]
1153 kind: Command,
1154 name: TpmLoadExternalCommand,
1155 cc: TpmCc::LoadExternal,
1156 handles: 0,
1157 parameters: {
1158 pub in_private: Tpm2bSensitive,
1159 pub in_public: Tpm2bPublic,
1160 pub hierarchy: TpmRh,
1161 }
1162}
1163
1164tpm_struct! {
1165 #[derive(Debug, PartialEq, Eq, Clone)]
1166 kind: Response,
1167 name: TpmLoadExternalResponse,
1168 cc: TpmCc::LoadExternal,
1169 handles: 1,
1170 parameters: {
1171 pub name: Tpm2bName,
1172 }
1173}
1174
1175tpm_struct! {
1176 #[derive(Debug, PartialEq, Eq, Clone)]
1177 kind: Command,
1178 name: TpmMakeCredentialCommand,
1179 cc: TpmCc::MakeCredential,
1180 handles: 1,
1181 parameters: {
1182 pub credential: Tpm2bDigest,
1183 pub object_name: Tpm2bName,
1184 }
1185}
1186
1187tpm_struct! {
1188 #[derive(Debug, PartialEq, Eq, Clone)]
1189 kind: Response,
1190 name: TpmMakeCredentialResponse,
1191 cc: TpmCc::MakeCredential,
1192 handles: 0,
1193 parameters: {
1194 pub credential_blob: Tpm2bIdObject,
1195 pub secret: Tpm2bEncryptedSecret,
1196 }
1197}
1198
1199tpm_struct! {
1200 #[derive(Debug, PartialEq, Eq, Clone)]
1201 kind: Command,
1202 name: TpmNvCertifyCommand,
1203 cc: TpmCc::NvCertify,
1204 handles: 3,
1205 parameters: {
1206 pub qualifying_data: Tpm2bData,
1207 pub in_scheme: TpmtSignature,
1208 pub size: u16,
1209 pub offset: u16,
1210 }
1211}
1212
1213tpm_struct! {
1214 #[derive(Debug, PartialEq, Eq, Clone)]
1215 kind: Response,
1216 name: TpmNvCertifyResponse,
1217 cc: TpmCc::NvCertify,
1218 handles: 0,
1219 parameters: {
1220 pub certify_info: Tpm2bAttest,
1221 pub signature: TpmtSignature,
1222 }
1223}
1224
1225tpm_struct! {
1226 #[derive(Debug, PartialEq, Eq, Clone)]
1227 kind: Command,
1228 name: TpmNvChangeAuthCommand,
1229 cc: TpmCc::NvChangeAuth,
1230 handles: 1,
1231 parameters: {
1232 pub new_auth: Tpm2bAuth,
1233 }
1234}
1235
1236tpm_struct! {
1237 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1238 kind: Response,
1239 name: TpmNvChangeAuthResponse,
1240 cc: TpmCc::NvChangeAuth,
1241 handles: 0,
1242 parameters: {}
1243}
1244
1245tpm_struct! {
1246 #[derive(Debug, PartialEq, Eq, Clone)]
1247 kind: Command,
1248 name: TpmNvDefineSpaceCommand,
1249 cc: TpmCc::NvDefineSpace,
1250 handles: 1,
1251 parameters: {
1252 pub auth: Tpm2bAuth,
1253 pub public_info: Tpm2bNvPublic,
1254 }
1255}
1256
1257tpm_struct! {
1258 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1259 kind: Response,
1260 name: TpmNvDefineSpaceResponse,
1261 cc: TpmCc::NvDefineSpace,
1262 handles: 0,
1263 parameters: {}
1264}
1265
1266tpm_struct! {
1267 #[derive(Debug, PartialEq, Eq, Clone)]
1268 kind: Command,
1269 name: TpmNvDefineSpace2Command,
1270 cc: TpmCc::NvDefineSpace2,
1271 handles: 1,
1272 parameters: {
1273 pub auth: Tpm2bAuth,
1274 pub public_info: crate::data::Tpm2bNvPublic2,
1275 }
1276}
1277
1278tpm_struct! {
1279 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1280 kind: Response,
1281 name: TpmNvDefineSpace2Response,
1282 cc: TpmCc::NvDefineSpace2,
1283 handles: 0,
1284 parameters: {}
1285}
1286
1287tpm_struct! {
1288 #[derive(Debug, PartialEq, Eq, Clone)]
1289 kind: Command,
1290 name: TpmNvExtendCommand,
1291 cc: TpmCc::NvExtend,
1292 handles: 2,
1293 parameters: {
1294 pub data: Tpm2bMaxNvBuffer,
1295 }
1296}
1297
1298tpm_struct! {
1299 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1300 kind: Response,
1301 name: TpmNvExtendResponse,
1302 cc: TpmCc::NvExtend,
1303 handles: 0,
1304 parameters: {}
1305}
1306
1307tpm_struct! {
1308 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1309 kind: Command,
1310 name: TpmNvGlobalWriteLockCommand,
1311 cc: TpmCc::NvGlobalWriteLock,
1312 handles: 1,
1313 parameters: {}
1314}
1315
1316tpm_struct! {
1317 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1318 kind: Response,
1319 name: TpmNvGlobalWriteLockResponse,
1320 cc: TpmCc::NvGlobalWriteLock,
1321 handles: 0,
1322 parameters: {}
1323}
1324
1325tpm_struct! {
1326 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1327 kind: Command,
1328 name: TpmNvIncrementCommand,
1329 cc: TpmCc::NvIncrement,
1330 handles: 2,
1331 parameters: {}
1332}
1333
1334tpm_struct! {
1335 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1336 kind: Response,
1337 name: TpmNvIncrementResponse,
1338 cc: TpmCc::NvIncrement,
1339 handles: 0,
1340 parameters: {}
1341}
1342
1343tpm_struct! {
1344 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
1345 kind: Command,
1346 name: TpmNvReadCommand,
1347 cc: TpmCc::NvRead,
1348 handles: 2,
1349 parameters: {
1350 pub size: u16,
1351 pub offset: u16,
1352 }
1353}
1354
1355tpm_struct! {
1356 #[derive(Debug, Default, PartialEq, Eq, Clone)]
1357 kind: Response,
1358 name: TpmNvReadResponse,
1359 cc: TpmCc::NvRead,
1360 handles: 0,
1361 parameters: {
1362 pub data: Tpm2bMaxNvBuffer,
1363 }
1364}
1365
1366tpm_struct! {
1367 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1368 kind: Command,
1369 name: TpmNvReadLockCommand,
1370 cc: TpmCc::NvReadLock,
1371 handles: 2,
1372 parameters: {}
1373}
1374
1375tpm_struct! {
1376 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1377 kind: Response,
1378 name: TpmNvReadLockResponse,
1379 cc: TpmCc::NvReadLock,
1380 handles: 0,
1381 parameters: {}
1382}
1383
1384tpm_struct! {
1385 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
1386 kind: Command,
1387 name: TpmNvReadPublicCommand,
1388 cc: TpmCc::NvReadPublic,
1389 handles: 1,
1390 parameters: {}
1391}
1392
1393tpm_struct! {
1394 #[derive(Debug, PartialEq, Eq, Clone)]
1395 kind: Response,
1396 name: TpmNvReadPublicResponse,
1397 cc: TpmCc::NvReadPublic,
1398 handles: 0,
1399 parameters: {
1400 pub nv_public: Tpm2bNvPublic,
1401 pub nv_name: Tpm2bName,
1402 }
1403}
1404
1405tpm_struct! {
1406 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
1407 kind: Command,
1408 name: TpmNvReadPublic2Command,
1409 cc: TpmCc::NvReadPublic2,
1410 handles: 1,
1411 parameters: {}
1412}
1413
1414tpm_struct! {
1415 #[derive(Debug, PartialEq, Eq, Clone)]
1416 kind: Response,
1417 name: TpmNvReadPublic2Response,
1418 cc: TpmCc::NvReadPublic2,
1419 handles: 0,
1420 parameters: {
1421 pub nv_public: crate::data::Tpm2bNvPublic2,
1422 pub nv_name: Tpm2bName,
1423 }
1424}
1425
1426tpm_struct! {
1427 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
1428 kind: Command,
1429 name: TpmNvSetBitsCommand,
1430 cc: TpmCc::NvSetBits,
1431 handles: 2,
1432 parameters: {
1433 pub bits: u64,
1434 }
1435}
1436
1437tpm_struct! {
1438 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1439 kind: Response,
1440 name: TpmNvSetBitsResponse,
1441 cc: TpmCc::NvSetBits,
1442 handles: 0,
1443 parameters: {}
1444}
1445
1446tpm_struct! {
1447 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
1448 kind: Command,
1449 name: TpmNvUndefineSpaceCommand,
1450 cc: TpmCc::NvUndefineSpace,
1451 handles: 2,
1452 parameters: {}
1453}
1454
1455tpm_struct! {
1456 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1457 kind: Response,
1458 name: TpmNvUndefineSpaceResponse,
1459 cc: TpmCc::NvUndefineSpace,
1460 handles: 0,
1461 parameters: {}
1462}
1463
1464tpm_struct! {
1465 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
1466 kind: Command,
1467 name: TpmNvUndefineSpaceSpecialCommand,
1468 cc: TpmCc::NvUndefineSpaceSpecial,
1469 handles: 2,
1470 parameters: {}
1471}
1472
1473tpm_struct! {
1474 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1475 kind: Response,
1476 name: TpmNvUndefineSpaceSpecialResponse,
1477 cc: TpmCc::NvUndefineSpaceSpecial,
1478 handles: 0,
1479 parameters: {}
1480}
1481
1482tpm_struct! {
1483 #[derive(Debug, PartialEq, Eq, Clone)]
1484 kind: Command,
1485 name: TpmNvWriteCommand,
1486 cc: TpmCc::NvWrite,
1487 handles: 2,
1488 parameters: {
1489 pub data: Tpm2bMaxNvBuffer,
1490 pub offset: u16,
1491 }
1492}
1493
1494tpm_struct! {
1495 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1496 kind: Response,
1497 name: TpmNvWriteResponse,
1498 cc: TpmCc::NvWrite,
1499 handles: 0,
1500 parameters: {}
1501}
1502
1503tpm_struct! {
1504 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1505 kind: Command,
1506 name: TpmNvWriteLockCommand,
1507 cc: TpmCc::NvWriteLock,
1508 handles: 2,
1509 parameters: {}
1510}
1511
1512tpm_struct! {
1513 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1514 kind: Response,
1515 name: TpmNvWriteLockResponse,
1516 cc: TpmCc::NvWriteLock,
1517 handles: 0,
1518 parameters: {}
1519}
1520
1521tpm_struct! {
1522 #[derive(Debug, Default, PartialEq, Eq, Clone)]
1523 kind: Command,
1524 name: TpmObjectChangeAuthCommand,
1525 cc: TpmCc::ObjectChangeAuth,
1526 handles: 2,
1527 parameters: {
1528 pub new_auth: Tpm2bAuth,
1529 }
1530}
1531
1532tpm_struct! {
1533 #[derive(Debug, Default, PartialEq, Eq, Clone)]
1534 kind: Response,
1535 name: TpmObjectChangeAuthResponse,
1536 cc: TpmCc::ObjectChangeAuth,
1537 handles: 0,
1538 parameters: {
1539 pub out_private: Tpm2bPrivate,
1540 }
1541}
1542
1543tpm_struct! {
1544 #[derive(Debug, PartialEq, Eq, Clone)]
1545 kind: Command,
1546 name: TpmPcrAllocateCommand,
1547 cc: TpmCc::PcrAllocate,
1548 handles: 1,
1549 parameters: {
1550 pub pcr_allocation: TpmlPcrSelection,
1551 }
1552}
1553
1554tpm_struct! {
1555 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
1556 kind: Response,
1557 name: TpmPcrAllocateResponse,
1558 cc: TpmCc::PcrAllocate,
1559 handles: 0,
1560 parameters: {
1561 pub allocation_success: TpmiYesNo,
1562 pub max_pcr: u32,
1563 pub size_needed: u32,
1564 pub size_available: u32,
1565 }
1566}
1567
1568tpm_struct! {
1569 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
1570 kind: Command,
1571 name: TpmPcrEventCommand,
1572 cc: TpmCc::PcrEvent,
1573 handles: 1,
1574 parameters: {
1575 pub event_data: Tpm2bEvent,
1576 }
1577}
1578
1579tpm_struct! {
1580 #[derive(Debug, Default, PartialEq, Eq, Clone)]
1581 kind: Response,
1582 name: TpmPcrEventResponse,
1583 cc: TpmCc::PcrEvent,
1584 handles: 0,
1585 parameters: {
1586 pub digests: TpmlDigestValues,
1587 }
1588}
1589
1590tpm_struct! {
1591 #[derive(Debug, PartialEq, Eq, Clone)]
1592 kind: Command,
1593 name: TpmPcrExtendCommand,
1594 cc: TpmCc::PcrExtend,
1595 handles: 1,
1596 parameters: {
1597 pub digests: TpmlDigestValues,
1598 }
1599}
1600
1601tpm_struct! {
1602 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1603 kind: Response,
1604 name: TpmPcrExtendResponse,
1605 cc: TpmCc::PcrExtend,
1606 handles: 0,
1607 parameters: {}
1608}
1609
1610tpm_struct! {
1611 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1612 kind: Command,
1613 name: TpmPcrResetCommand,
1614 cc: TpmCc::PcrReset,
1615 handles: 1,
1616 parameters: {}
1617}
1618
1619tpm_struct! {
1620 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1621 kind: Response,
1622 name: TpmPcrResetResponse,
1623 cc: TpmCc::PcrReset,
1624 handles: 0,
1625 parameters: {}
1626}
1627
1628tpm_struct! {
1629 #[derive(Debug, PartialEq, Eq, Clone)]
1630 kind: Command,
1631 name: TpmPcrReadCommand,
1632 cc: TpmCc::PcrRead,
1633 handles: 0,
1634 parameters: {
1635 pub pcr_selection_in: TpmlPcrSelection,
1636 }
1637}
1638
1639tpm_struct! {
1640 #[derive(Debug, Default, PartialEq, Eq, Clone)]
1641 kind: Response,
1642 name: TpmPcrReadResponse,
1643 cc: TpmCc::PcrRead,
1644 handles: 0,
1645 parameters: {
1646 pub pcr_update_counter: u32,
1647 pub pcr_selection_out: TpmlPcrSelection,
1648 pub pcr_values: TpmlDigest,
1649 }
1650}
1651
1652tpm_struct! {
1653 #[derive(Debug, PartialEq, Eq, Clone)]
1654 kind: Command,
1655 name: TpmPcrSetAuthPolicyCommand,
1656 cc: TpmCc::PcrSetAuthPolicy,
1657 handles: 1,
1658 parameters: {
1659 pub auth_policy: Tpm2bDigest,
1660 pub hash_alg: TpmAlgId,
1661 pub pcr_num: TpmRh,
1662 }
1663}
1664
1665tpm_struct! {
1666 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1667 kind: Response,
1668 name: TpmPcrSetAuthPolicyResponse,
1669 cc: TpmCc::PcrSetAuthPolicy,
1670 handles: 0,
1671 parameters: {}
1672}
1673
1674tpm_struct! {
1675 #[derive(Debug, PartialEq, Eq, Clone)]
1676 kind: Command,
1677 name: TpmPcrSetAuthValueCommand,
1678 cc: TpmCc::PcrSetAuthValue,
1679 handles: 1,
1680 parameters: {
1681 pub auth: Tpm2bDigest,
1682 }
1683}
1684
1685tpm_struct! {
1686 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1687 kind: Response,
1688 name: TpmPcrSetAuthValueResponse,
1689 cc: TpmCc::PcrSetAuthValue,
1690 handles: 0,
1691 parameters: {}
1692}
1693
1694tpm_struct! {
1695 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
1696 kind: Command,
1697 name: TpmPolicyAcSendSelectCommand,
1698 cc: TpmCc::PolicyAcSendSelect,
1699 handles: 1,
1700 parameters: {
1701 pub object_name: Tpm2bName,
1702 pub auth_handle_name: Tpm2bName,
1703 pub ac_name: Tpm2bName,
1704 pub include_object: TpmiYesNo,
1705 }
1706}
1707
1708tpm_struct! {
1709 #[derive(Debug, Default, PartialEq, Eq, Clone, Copy)]
1710 kind: Response,
1711 name: TpmPolicyAcSendSelectResponse,
1712 cc: TpmCc::PolicyAcSendSelect,
1713 handles: 0,
1714 parameters: {}
1715}
1716
1717tpm_struct! {
1718 #[derive(Debug, PartialEq, Eq, Clone)]
1719 kind: Command,
1720 name: TpmPolicyAuthorizeCommand,
1721 cc: TpmCc::PolicyAuthorize,
1722 handles: 1,
1723 parameters: {
1724 pub approved_policy: Tpm2bDigest,
1725 pub policy_ref: Tpm2bNonce,
1726 pub key_sign: Tpm2bName,
1727 pub check_ticket: TpmtTkVerified,
1728 }
1729}
1730
1731tpm_struct! {
1732 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1733 kind: Response,
1734 name: TpmPolicyAuthorizeResponse,
1735 cc: TpmCc::PolicyAuthorize,
1736 handles: 0,
1737 parameters: {}
1738}
1739
1740tpm_struct! {
1741 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1742 kind: Command,
1743 name: TpmPolicyAuthorizeNvCommand,
1744 cc: TpmCc::PolicyAuthorizeNv,
1745 handles: 3,
1746 parameters: {}
1747}
1748
1749tpm_struct! {
1750 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1751 kind: Response,
1752 name: TpmPolicyAuthorizeNvResponse,
1753 cc: TpmCc::PolicyAuthorizeNv,
1754 handles: 0,
1755 parameters: {}
1756}
1757
1758tpm_struct! {
1759 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1760 kind: Command,
1761 name: TpmPolicyAuthValueCommand,
1762 cc: TpmCc::PolicyAuthValue,
1763 handles: 1,
1764 parameters: {}
1765}
1766
1767tpm_struct! {
1768 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1769 kind: Response,
1770 name: TpmPolicyAuthValueResponse,
1771 cc: TpmCc::PolicyAuthValue,
1772 handles: 0,
1773 parameters: {}
1774}
1775
1776tpm_struct! {
1777 #[derive(Debug, PartialEq, Eq, Clone)]
1778 kind: Command,
1779 name: TpmPolicyCapabilityCommand,
1780 cc: TpmCc::PolicyCapability,
1781 handles: 1,
1782 parameters: {
1783 pub capability: TpmCap,
1784 pub property: u32,
1785 pub op: TpmEo,
1786 pub operand_b: Tpm2bMaxBuffer,
1787 }
1788}
1789
1790tpm_struct! {
1791 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1792 kind: Response,
1793 name: TpmPolicyCapabilityResponse,
1794 cc: TpmCc::PolicyCapability,
1795 handles: 0,
1796 parameters: {}
1797}
1798
1799tpm_struct! {
1800 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
1801 kind: Command,
1802 name: TpmPolicyCommandCodeCommand,
1803 cc: TpmCc::PolicyCommandCode,
1804 handles: 1,
1805 parameters: {
1806 pub code: TpmCc,
1807 }
1808}
1809
1810tpm_struct! {
1811 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1812 kind: Response,
1813 name: TpmPolicyCommandCodeResponse,
1814 cc: TpmCc::PolicyCommandCode,
1815 handles: 0,
1816 parameters: {}
1817}
1818
1819tpm_struct! {
1820 #[derive(Debug, PartialEq, Eq, Clone)]
1821 kind: Command,
1822 name: TpmPolicyCounterTimerCommand,
1823 cc: TpmCc::PolicyCounterTimer,
1824 handles: 1,
1825 parameters: {
1826 pub operand_b: Tpm2bMaxBuffer,
1827 pub offset: u16,
1828 pub operation: TpmEo,
1829 }
1830}
1831
1832tpm_struct! {
1833 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1834 kind: Response,
1835 name: TpmPolicyCounterTimerResponse,
1836 cc: TpmCc::PolicyCounterTimer,
1837 handles: 0,
1838 parameters: {}
1839}
1840
1841tpm_struct! {
1842 #[derive(Debug, PartialEq, Eq, Clone)]
1843 kind: Command,
1844 name: TpmPolicyCpHashCommand,
1845 cc: TpmCc::PolicyCpHash,
1846 handles: 1,
1847 parameters: {
1848 pub cp_hash_a: Tpm2bDigest,
1849 }
1850}
1851
1852tpm_struct! {
1853 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1854 kind: Response,
1855 name: TpmPolicyCpHashResponse,
1856 cc: TpmCc::PolicyCpHash,
1857 handles: 0,
1858 parameters: {}
1859}
1860
1861tpm_struct! {
1862 #[derive(Debug, PartialEq, Eq, Clone)]
1863 kind: Command,
1864 name: TpmPolicyDuplicationSelectCommand,
1865 cc: TpmCc::PolicyDuplicationSelect,
1866 handles: 1,
1867 parameters: {
1868 pub object_name: Tpm2bName,
1869 pub new_parent_name: Tpm2bName,
1870 pub include_object: TpmiYesNo,
1871 }
1872}
1873
1874tpm_struct! {
1875 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1876 kind: Response,
1877 name: TpmPolicyDuplicationSelectResponse,
1878 cc: TpmCc::PolicyDuplicationSelect,
1879 handles: 0,
1880 parameters: {}
1881}
1882
1883tpm_struct! {
1884 #[derive(Debug, Default, PartialEq, Eq, Clone)]
1885 kind: Command,
1886 name: TpmPolicyGetDigestCommand,
1887 cc: TpmCc::PolicyGetDigest,
1888 handles: 1,
1889 parameters: {}
1890}
1891
1892tpm_struct! {
1893 #[derive(Debug, Default, PartialEq, Eq, Clone)]
1894 kind: Response,
1895 name: TpmPolicyGetDigestResponse,
1896 cc: TpmCc::PolicyGetDigest,
1897 handles: 0,
1898 parameters: {
1899 pub policy_digest: Tpm2bDigest,
1900 }
1901}
1902
1903tpm_struct! {
1904 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
1905 kind: Command,
1906 name: TpmPolicyLocalityCommand,
1907 cc: TpmCc::PolicyLocality,
1908 handles: 1,
1909 parameters: {
1910 pub locality: TpmaLocality,
1911 }
1912}
1913
1914tpm_struct! {
1915 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1916 kind: Response,
1917 name: TpmPolicyLocalityResponse,
1918 cc: TpmCc::PolicyLocality,
1919 handles: 0,
1920 parameters: {}
1921}
1922
1923tpm_struct! {
1924 #[derive(Debug, PartialEq, Eq, Clone)]
1925 kind: Command,
1926 name: TpmPolicyNameHashCommand,
1927 cc: TpmCc::PolicyNameHash,
1928 handles: 1,
1929 parameters: {
1930 pub name_hash: Tpm2bDigest,
1931 }
1932}
1933
1934tpm_struct! {
1935 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1936 kind: Response,
1937 name: TpmPolicyNameHashResponse,
1938 cc: TpmCc::PolicyNameHash,
1939 handles: 0,
1940 parameters: {}
1941}
1942
1943tpm_struct! {
1944 #[derive(Debug, PartialEq, Eq, Clone)]
1945 kind: Command,
1946 name: TpmPolicyNvCommand,
1947 cc: TpmCc::PolicyNv,
1948 handles: 3,
1949 parameters: {
1950 pub operand_b: Tpm2bMaxBuffer,
1951 pub offset: u16,
1952 pub operation: TpmEo,
1953 }
1954}
1955
1956tpm_struct! {
1957 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1958 kind: Response,
1959 name: TpmPolicyNvResponse,
1960 cc: TpmCc::PolicyNv,
1961 handles: 0,
1962 parameters: {}
1963}
1964
1965tpm_struct! {
1966 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
1967 kind: Command,
1968 name: TpmPolicyNvWrittenCommand,
1969 cc: TpmCc::PolicyNvWritten,
1970 handles: 1,
1971 parameters: {
1972 pub written_set: TpmiYesNo,
1973 }
1974}
1975
1976tpm_struct! {
1977 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1978 kind: Response,
1979 name: TpmPolicyNvWrittenResponse,
1980 cc: TpmCc::PolicyNvWritten,
1981 handles: 0,
1982 parameters: {}
1983}
1984
1985tpm_struct! {
1986 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1987 kind: Command,
1988 name: TpmPolicyOrCommand,
1989 cc: TpmCc::PolicyOr,
1990 handles: 1,
1991 parameters: {
1992 pub p_hash_list: TpmlDigest,
1993 }
1994}
1995
1996tpm_struct! {
1997 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
1998 kind: Response,
1999 name: TpmPolicyOrResponse,
2000 cc: TpmCc::PolicyOr,
2001 handles: 0,
2002 parameters: {}
2003}
2004
2005tpm_struct! {
2006 #[derive(Debug, PartialEq, Eq, Clone)]
2007 kind: Command,
2008 name: TpmPolicyParametersCommand,
2009 cc: TpmCc::PolicyParameters,
2010 handles: 1,
2011 parameters: {
2012 pub p_hash: Tpm2bDigest,
2013 }
2014}
2015
2016tpm_struct! {
2017 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2018 kind: Response,
2019 name: TpmPolicyParametersResponse,
2020 cc: TpmCc::PolicyParameters,
2021 handles: 0,
2022 parameters: {}
2023}
2024
2025tpm_struct! {
2026 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2027 kind: Command,
2028 name: TpmPolicyPasswordCommand,
2029 cc: TpmCc::PolicyPassword,
2030 handles: 1,
2031 parameters: {}
2032}
2033
2034tpm_struct! {
2035 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2036 kind: Response,
2037 name: TpmPolicyPasswordResponse,
2038 cc: TpmCc::PolicyPassword,
2039 handles: 0,
2040 parameters: {}
2041}
2042
2043tpm_struct! {
2044 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2045 kind: Command,
2046 name: TpmPolicyPhysicalPresenceCommand,
2047 cc: TpmCc::PolicyPhysicalPresence,
2048 handles: 1,
2049 parameters: {}
2050}
2051
2052tpm_struct! {
2053 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2054 kind: Response,
2055 name: TpmPolicyPhysicalPresenceResponse,
2056 cc: TpmCc::PolicyPhysicalPresence,
2057 handles: 0,
2058 parameters: {}
2059}
2060
2061tpm_struct! (
2062 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2063 kind: Command,
2064 name: TpmPolicyPcrCommand,
2065 cc: TpmCc::PolicyPcr,
2066 handles: 1,
2067 parameters: {
2068 pub pcr_digest: Tpm2bDigest,
2069 pub pcrs: TpmlPcrSelection,
2070 }
2071);
2072
2073tpm_struct! (
2074 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2075 kind: Response,
2076 name: TpmPolicyPcrResponse,
2077 cc: TpmCc::PolicyPcr,
2078 handles: 0,
2079 parameters: {}
2080);
2081
2082tpm_struct! {
2083 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
2084 kind: Command,
2085 name: TpmPolicyRestartCommand,
2086 cc: TpmCc::PolicyRestart,
2087 handles: 1,
2088 parameters: {}
2089}
2090
2091tpm_struct! {
2092 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2093 kind: Response,
2094 name: TpmPolicyRestartResponse,
2095 cc: TpmCc::PolicyRestart,
2096 handles: 0,
2097 parameters: {}
2098}
2099
2100tpm_struct! {
2101 #[derive(Debug, Default, PartialEq, Eq, Clone)]
2102 kind: Command,
2103 name: TpmPolicySecretCommand,
2104 cc: TpmCc::PolicySecret,
2105 handles: 2,
2106 parameters: {
2107 pub nonce_tpm: Tpm2bNonce,
2108 pub cp_hash_a: Tpm2bDigest,
2109 pub policy_ref: Tpm2bNonce,
2110 pub expiration: i32,
2111 }
2112}
2113
2114tpm_struct! {
2115 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2116 kind: Response,
2117 name: TpmPolicySecretResponse,
2118 cc: TpmCc::PolicySecret,
2119 handles: 0,
2120 parameters: {
2121 pub timeout: Tpm2bTimeout,
2122 pub policy_ticket: TpmtTkAuth,
2123 }
2124}
2125
2126tpm_struct! {
2127 #[derive(Debug, PartialEq, Eq, Clone)]
2128 kind: Command,
2129 name: TpmPolicySignedCommand,
2130 cc: TpmCc::PolicySigned,
2131 handles: 2,
2132 parameters: {
2133 pub nonce_tpm: Tpm2bNonce,
2134 pub cp_hash_a: Tpm2bDigest,
2135 pub policy_ref: Tpm2bNonce,
2136 pub expiration: i32,
2137 pub auth: TpmtSignature,
2138 }
2139}
2140
2141tpm_struct! {
2142 #[derive(Debug, PartialEq, Eq, Clone)]
2143 kind: Response,
2144 name: TpmPolicySignedResponse,
2145 cc: TpmCc::PolicySigned,
2146 handles: 0,
2147 parameters: {
2148 pub timeout: Tpm2bTimeout,
2149 pub policy_ticket: TpmtTkAuth,
2150 }
2151}
2152
2153tpm_struct! {
2154 #[derive(Debug, PartialEq, Eq, Clone)]
2155 kind: Command,
2156 name: TpmPolicyTemplateCommand,
2157 cc: TpmCc::PolicyTemplate,
2158 handles: 1,
2159 parameters: {
2160 pub template_hash: Tpm2bDigest,
2161 }
2162}
2163
2164tpm_struct! {
2165 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2166 kind: Response,
2167 name: TpmPolicyTemplateResponse,
2168 cc: TpmCc::PolicyTemplate,
2169 handles: 0,
2170 parameters: {}
2171}
2172
2173tpm_struct! {
2174 #[derive(Debug, PartialEq, Eq, Clone)]
2175 kind: Command,
2176 name: TpmPolicyTicketCommand,
2177 cc: TpmCc::PolicyTicket,
2178 handles: 1,
2179 parameters: {
2180 pub timeout: Tpm2bTimeout,
2181 pub cp_hash_a: Tpm2bDigest,
2182 pub policy_ref: Tpm2bNonce,
2183 pub auth_name: Tpm2bName,
2184 pub ticket: TpmtTkAuth,
2185 }
2186}
2187
2188tpm_struct! {
2189 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2190 kind: Response,
2191 name: TpmPolicyTicketResponse,
2192 cc: TpmCc::PolicyTicket,
2193 handles: 0,
2194 parameters: {}
2195}
2196
2197tpm_struct! {
2198 #[derive(Debug, PartialEq, Eq, Clone)]
2199 kind: Command,
2200 name: TpmPolicyTransportSpdmCommand,
2201 cc: TpmCc::PolicyTransportSpdm,
2202 handles: 1,
2203 parameters: {
2204 pub req_key_name: Tpm2bName,
2205 pub tpm_key_name: Tpm2bName,
2206 }
2207}
2208
2209tpm_struct! {
2210 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2211 kind: Response,
2212 name: TpmPolicyTransportSpdmResponse,
2213 cc: TpmCc::PolicyTransportSpdm,
2214 handles: 0,
2215 parameters: {}
2216}
2217
2218tpm_struct! {
2219 #[derive(Debug, PartialEq, Eq, Clone)]
2220 kind: Command,
2221 name: TpmPpCommandsCommand,
2222 cc: TpmCc::PpCommands,
2223 handles: 1,
2224 parameters: {
2225 pub set_list: TpmlCc,
2226 pub clear_list: TpmlCc,
2227 }
2228}
2229
2230tpm_struct! {
2231 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2232 kind: Response,
2233 name: TpmPpCommandsResponse,
2234 cc: TpmCc::PpCommands,
2235 handles: 0,
2236 parameters: {}
2237}
2238
2239tpm_struct! {
2240 #[derive(Debug, PartialEq, Eq, Clone)]
2241 kind: Command,
2242 name: TpmQuoteCommand,
2243 cc: TpmCc::Quote,
2244 handles: 1,
2245 parameters: {
2246 pub qualifying_data: Tpm2bData,
2247 pub in_scheme: TpmtSignature,
2248 pub pcr_select: TpmlPcrSelection,
2249 }
2250}
2251
2252tpm_struct! {
2253 #[derive(Debug, PartialEq, Eq, Clone)]
2254 kind: Response,
2255 name: TpmQuoteResponse,
2256 cc: TpmCc::Quote,
2257 handles: 0,
2258 parameters: {
2259 pub quoted: Tpm2bAttest,
2260 pub signature: TpmtSignature,
2261 }
2262}
2263
2264tpm_struct! {
2265 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2266 kind: Command,
2267 name: TpmReadClockCommand,
2268 cc: TpmCc::ReadClock,
2269 handles: 0,
2270 parameters: {}
2271}
2272
2273tpm_struct! {
2274 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2275 kind: Response,
2276 name: TpmReadClockResponse,
2277 cc: TpmCc::ReadClock,
2278 handles: 0,
2279 parameters: {
2280 pub current_time: TpmsTimeInfo,
2281 }
2282}
2283
2284tpm_struct! {
2285 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2286 kind: Command,
2287 name: TpmReadOnlyControlCommand,
2288 cc: TpmCc::ReadOnlyControl,
2289 handles: 1,
2290 parameters: {
2291 pub state: TpmiYesNo,
2292 }
2293}
2294
2295tpm_struct! {
2296 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2297 kind: Response,
2298 name: TpmReadOnlyControlResponse,
2299 cc: TpmCc::ReadOnlyControl,
2300 handles: 0,
2301 parameters: {}
2302}
2303
2304tpm_struct! {
2305 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2306 kind: Command,
2307 name: TpmReadPublicCommand,
2308 cc: TpmCc::ReadPublic,
2309 handles: 1,
2310 parameters: {}
2311}
2312
2313tpm_struct! {
2314 #[derive(Debug, Default, PartialEq, Eq, Clone)]
2315 kind: Response,
2316 name: TpmReadPublicResponse,
2317 cc: TpmCc::ReadPublic,
2318 handles: 0,
2319 parameters: {
2320 pub out_public: Tpm2bPublic,
2321 pub name: Tpm2bName,
2322 pub qualified_name: Tpm2bName,
2323 }
2324}
2325
2326tpm_struct! {
2327 #[derive(Debug, PartialEq, Eq, Clone)]
2328 kind: Command,
2329 name: TpmRewrapCommand,
2330 cc: TpmCc::Rewrap,
2331 handles: 2,
2332 parameters: {
2333 pub in_duplicate: Tpm2bPrivate,
2334 pub name: Tpm2bName,
2335 pub in_sym_seed: Tpm2bEncryptedSecret,
2336 }
2337}
2338
2339tpm_struct! {
2340 #[derive(Debug, PartialEq, Eq, Clone)]
2341 kind: Response,
2342 name: TpmRewrapResponse,
2343 cc: TpmCc::Rewrap,
2344 handles: 0,
2345 parameters: {
2346 pub out_duplicate: Tpm2bPrivate,
2347 pub out_sym_seed: Tpm2bEncryptedSecret,
2348 }
2349}
2350
2351tpm_struct! {
2352 #[derive(Debug, PartialEq, Eq, Clone)]
2353 kind: Command,
2354 name: TpmRsaDecryptCommand,
2355 cc: TpmCc::RsaDecrypt,
2356 handles: 1,
2357 parameters: {
2358 pub cipher_text: Tpm2bPublicKeyRsa,
2359 pub in_scheme: TpmtRsaDecrypt,
2360 pub label: Tpm2bData,
2361 }
2362}
2363
2364tpm_struct! {
2365 #[derive(Debug, PartialEq, Eq, Clone)]
2366 kind: Response,
2367 name: TpmRsaDecryptResponse,
2368 cc: TpmCc::RsaDecrypt,
2369 handles: 0,
2370 parameters: {
2371 pub message: Tpm2bPublicKeyRsa,
2372 }
2373}
2374
2375tpm_struct! {
2376 #[derive(Debug, PartialEq, Eq, Clone)]
2377 kind: Command,
2378 name: TpmRsaEncryptCommand,
2379 cc: TpmCc::RsaEncrypt,
2380 handles: 1,
2381 parameters: {
2382 pub message: Tpm2bPublicKeyRsa,
2383 pub in_scheme: TpmtRsaDecrypt,
2384 pub label: Tpm2bData,
2385 }
2386}
2387
2388tpm_struct! {
2389 #[derive(Debug, PartialEq, Eq, Clone)]
2390 kind: Response,
2391 name: TpmRsaEncryptResponse,
2392 cc: TpmCc::RsaEncrypt,
2393 handles: 0,
2394 parameters: {
2395 pub out_data: Tpm2bPublicKeyRsa,
2396 }
2397}
2398
2399tpm_struct! {
2400 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
2401 kind: Command,
2402 name: TpmSelfTestCommand,
2403 cc: TpmCc::SelfTest,
2404 handles: 0,
2405 parameters: {
2406 pub full_test: TpmiYesNo,
2407 }
2408}
2409
2410tpm_struct! {
2411 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2412 kind: Response,
2413 name: TpmSelfTestResponse,
2414 cc: TpmCc::SelfTest,
2415 handles: 0,
2416 parameters: {}
2417}
2418
2419tpm_struct! {
2420 #[derive(Debug, PartialEq, Eq, Clone)]
2421 kind: Command,
2422 name: TpmSequenceCompleteCommand,
2423 cc: TpmCc::SequenceComplete,
2424 handles: 1,
2425 parameters: {
2426 pub buffer: Tpm2bMaxBuffer,
2427 pub hierarchy: TpmRh,
2428 }
2429}
2430
2431tpm_struct! {
2432 #[derive(Debug, PartialEq, Eq, Clone)]
2433 kind: Response,
2434 name: TpmSequenceCompleteResponse,
2435 cc: TpmCc::SequenceComplete,
2436 handles: 0,
2437 parameters: {
2438 pub result: Tpm2bDigest,
2439 pub validation: TpmtTkHashcheck,
2440 }
2441}
2442
2443tpm_struct! {
2444 #[derive(Debug, PartialEq, Eq, Clone)]
2445 kind: Command,
2446 name: TpmSequenceUpdateCommand,
2447 cc: TpmCc::SequenceUpdate,
2448 handles: 1,
2449 parameters: {
2450 pub buffer: Tpm2bMaxBuffer,
2451 }
2452}
2453
2454tpm_struct! {
2455 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2456 kind: Response,
2457 name: TpmSequenceUpdateResponse,
2458 cc: TpmCc::SequenceUpdate,
2459 handles: 0,
2460 parameters: {}
2461}
2462
2463tpm_struct! {
2464 #[derive(Debug, PartialEq, Eq, Clone)]
2465 kind: Command,
2466 name: TpmSetAlgorithmSetCommand,
2467 cc: TpmCc::SetAlgorithmSet,
2468 handles: 1,
2469 parameters: {
2470 pub algorithm_set: u32,
2471 }
2472}
2473
2474tpm_struct! {
2475 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2476 kind: Response,
2477 name: TpmSetAlgorithmSetResponse,
2478 cc: TpmCc::SetAlgorithmSet,
2479 handles: 0,
2480 parameters: {}
2481}
2482
2483tpm_struct! {
2484 #[derive(Debug, PartialEq, Eq, Clone)]
2485 kind: Command,
2486 name: TpmSetCommandCodeAuditStatusCommand,
2487 cc: TpmCc::SetCommandCodeAuditStatus,
2488 handles: 1,
2489 parameters: {
2490 pub audit_alg: TpmiAlgHash,
2491 pub set_list: TpmlCc,
2492 pub clear_list: TpmlCc,
2493 }
2494}
2495
2496tpm_struct! {
2497 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2498 kind: Response,
2499 name: TpmSetCommandCodeAuditStatusResponse,
2500 cc: TpmCc::SetCommandCodeAuditStatus,
2501 handles: 0,
2502 parameters: {}
2503}
2504
2505tpm_struct! {
2506 #[derive(Debug, PartialEq, Eq, Clone)]
2507 kind: Command,
2508 name: TpmSetPrimaryPolicyCommand,
2509 cc: TpmCc::SetPrimaryPolicy,
2510 handles: 1,
2511 parameters: {
2512 pub auth_policy: Tpm2bDigest,
2513 pub hash_alg: TpmAlgId,
2514 }
2515}
2516
2517tpm_struct! {
2518 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2519 kind: Response,
2520 name: TpmSetPrimaryPolicyResponse,
2521 cc: TpmCc::SetPrimaryPolicy,
2522 handles: 0,
2523 parameters: {}
2524}
2525
2526tpm_struct! {
2527 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
2528 kind: Command,
2529 name: TpmShutdownCommand,
2530 cc: TpmCc::Shutdown,
2531 handles: 0,
2532 parameters: {
2533 pub shutdown_type: TpmSu,
2534 }
2535}
2536
2537tpm_struct! {
2538 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2539 kind: Response,
2540 name: TpmShutdownResponse,
2541 cc: TpmCc::Shutdown,
2542 handles: 0,
2543 parameters: {}
2544}
2545
2546tpm_struct! {
2547 #[derive(Debug, PartialEq, Eq, Clone)]
2548 kind: Command,
2549 name: TpmSignCommand,
2550 cc: TpmCc::Sign,
2551 handles: 1,
2552 parameters: {
2553 pub digest: Tpm2bDigest,
2554 pub in_scheme: TpmtSignature,
2555 pub validation: TpmtTkHashcheck,
2556 }
2557}
2558
2559tpm_struct! {
2560 #[derive(Debug, PartialEq, Eq, Clone)]
2561 kind: Response,
2562 name: TpmSignResponse,
2563 cc: TpmCc::Sign,
2564 handles: 0,
2565 parameters: {
2566 pub signature: TpmtSignature,
2567 }
2568}
2569
2570tpm_struct! {
2571 #[derive(Debug, PartialEq, Eq, Clone)]
2572 kind: Command,
2573 name: TpmStartAuthSessionCommand,
2574 cc: TpmCc::StartAuthSession,
2575 handles: 2,
2576 parameters: {
2577 pub nonce_caller: Tpm2bNonce,
2578 pub encrypted_salt: Tpm2bEncryptedSecret,
2579 pub session_type: TpmSe,
2580 pub symmetric: TpmtSymDefObject,
2581 pub auth_hash: TpmAlgId,
2582 }
2583}
2584
2585tpm_struct! {
2586 #[derive(Debug, Default, PartialEq, Eq, Clone)]
2587 kind: Response,
2588 name: TpmStartAuthSessionResponse,
2589 cc: TpmCc::StartAuthSession,
2590 handles: 1,
2591 parameters: {
2592 pub nonce_tpm: Tpm2bNonce,
2593 }
2594}
2595
2596tpm_struct! {
2597 #[derive(Debug, PartialEq, Eq, Copy, Clone)]
2598 kind: Command,
2599 name: TpmStartupCommand,
2600 cc: TpmCc::Startup,
2601 handles: 0,
2602 parameters: {
2603 pub startup_type: TpmSu,
2604 }
2605}
2606
2607tpm_struct! {
2608 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2609 kind: Response,
2610 name: TpmStartupResponse,
2611 cc: TpmCc::Startup,
2612 handles: 0,
2613 parameters: {}
2614}
2615
2616tpm_struct! {
2617 #[derive(Debug, PartialEq, Eq, Clone)]
2618 kind: Command,
2619 name: TpmStirRandomCommand,
2620 cc: TpmCc::StirRandom,
2621 handles: 0,
2622 parameters: {
2623 pub in_data: Tpm2bSensitiveData,
2624 }
2625}
2626
2627tpm_struct! {
2628 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2629 kind: Response,
2630 name: TpmStirRandomResponse,
2631 cc: TpmCc::StirRandom,
2632 handles: 0,
2633 parameters: {}
2634}
2635
2636tpm_struct! {
2637 #[derive(Debug, PartialEq, Eq, Clone)]
2638 kind: Command,
2639 name: TpmTestParmsCommand,
2640 cc: TpmCc::TestParms,
2641 handles: 0,
2642 parameters: {
2643 pub parameters: TpmtPublicParms,
2644 }
2645}
2646
2647tpm_struct! {
2648 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2649 kind: Response,
2650 name: TpmTestParmsResponse,
2651 cc: TpmCc::TestParms,
2652 handles: 0,
2653 parameters: {}
2654}
2655
2656tpm_struct! {
2657 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2658 kind: Command,
2659 name: TpmUnsealCommand,
2660 cc: TpmCc::Unseal,
2661 handles: 1,
2662 parameters: {}
2663}
2664
2665tpm_struct! {
2666 #[derive(Debug, Default, PartialEq, Eq, Clone)]
2667 kind: Response,
2668 name: TpmUnsealResponse,
2669 cc: TpmCc::Unseal,
2670 handles: 0,
2671 parameters: {
2672 pub out_data: Tpm2bSensitiveData,
2673 }
2674}
2675
2676tpm_struct! {
2677 #[derive(Debug, PartialEq, Eq, Clone)]
2678 kind: Command,
2679 name: TpmVendorTcgTestCommand,
2680 cc: TpmCc::VendorTcgTest,
2681 handles: 0,
2682 parameters: {
2683 pub input_data: Tpm2bData,
2684 }
2685}
2686
2687tpm_struct! {
2688 #[derive(Debug, PartialEq, Eq, Clone)]
2689 kind: Response,
2690 name: TpmVendorTcgTestResponse,
2691 cc: TpmCc::VendorTcgTest,
2692 handles: 0,
2693 parameters: {
2694 pub output_data: Tpm2bData,
2695 }
2696}
2697
2698tpm_struct! {
2699 #[derive(Debug, PartialEq, Eq, Clone)]
2700 kind: Command,
2701 name: TpmVerifySignatureCommand,
2702 cc: TpmCc::VerifySignature,
2703 handles: 1,
2704 parameters: {
2705 pub digest: Tpm2bDigest,
2706 pub signature: TpmtSignature,
2707 }
2708}
2709
2710tpm_struct! {
2711 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
2712 kind: Response,
2713 name: TpmVerifySignatureResponse,
2714 cc: TpmCc::VerifySignature,
2715 handles: 0,
2716 parameters: {
2717 pub validation: TpmtTkVerified,
2718 }
2719}
2720
2721tpm_struct! {
2722 #[derive(Debug, PartialEq, Eq, Clone)]
2723 kind: Command,
2724 name: TpmZGen2PhaseCommand,
2725 cc: TpmCc::ZGen2Phase,
2726 handles: 1,
2727 parameters: {
2728 pub in_qsb: Tpm2bEccPoint,
2729 pub in_qeb: Tpm2bEccPoint,
2730 pub in_scheme: TpmiEccKeyExchange,
2731 pub counter: u16,
2732 }
2733}
2734
2735tpm_struct! {
2736 #[derive(Debug, PartialEq, Eq, Clone)]
2737 kind: Response,
2738 name: TpmZGen2PhaseResponse,
2739 cc: TpmCc::ZGen2Phase,
2740 handles: 0,
2741 parameters: {
2742 pub out_z1: Tpm2bEccPoint,
2743 pub out_z2: Tpm2bEccPoint,
2744 }
2745}