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