tpm2_protocol/message/
dictionary_attack.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2// Copyright (c) 2025 Opinsys Oy
3
4//! 25.2 `TPM2_DictionaryAttackLockReset`
5//! 25.3 `TPM2_DictionaryAttackParameters`
6
7use crate::{data::TpmCc, tpm_struct};
8use core::fmt::Debug;
9
10tpm_struct! {
11    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
12    kind: Command,
13    name: TpmDictionaryAttackLockResetCommand,
14    cc: TpmCc::DictionaryAttackLockReset,
15    handles: {
16        pub lock_handle: crate::data::TpmiRhHierarchy,
17    },
18    parameters: {}
19}
20
21tpm_struct! {
22    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
23    kind: Response,
24    name: TpmDictionaryAttackLockResetResponse,
25    cc: TpmCc::DictionaryAttackLockReset,
26    handles: {},
27    parameters: {}
28}
29
30tpm_struct! {
31    #[derive(Debug, PartialEq, Eq, Clone, Copy)]
32    kind: Command,
33    name: TpmDictionaryAttackParametersCommand,
34    cc: TpmCc::DictionaryAttackParameters,
35    handles: {
36        pub lock_handle: crate::data::TpmiRhHierarchy,
37    },
38    parameters: {
39        pub new_max_tries: u32,
40        pub new_recovery_time: u32,
41        pub lockout_recovery: u32,
42    }
43}
44
45tpm_struct! {
46    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
47    kind: Response,
48    name: TpmDictionaryAttackParametersResponse,
49    cc: TpmCc::DictionaryAttackParameters,
50    handles: {},
51    parameters: {}
52}