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