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