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