tpm2_protocol/message/
miscellaneous_management.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2// Copyright (c) 2025 Opinsys Oy
3
4//! 26.2 `TPM2_PP_Commands`
5//! 26.3 `TPM2_SetAlgorithmSet`
6
7use crate::{
8    data::{TpmCc, TpmlCc},
9    tpm_struct,
10};
11use core::fmt::Debug;
12
13tpm_struct! {
14    #[derive(Debug, PartialEq, Eq, Clone)]
15    kind: Command,
16    name: TpmPpCommandsCommand,
17    cc: TpmCc::PpCommands,
18    handles: {
19        pub auth: crate::data::TpmiRhHierarchy,
20    },
21    parameters: {
22        pub set_list: TpmlCc,
23        pub clear_list: TpmlCc,
24    }
25}
26
27tpm_struct! {
28    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
29    kind: Response,
30    name: TpmPpCommandsResponse,
31    cc: TpmCc::PpCommands,
32    handles: {},
33    parameters: {}
34}
35
36tpm_struct! {
37    #[derive(Debug, PartialEq, Eq, Clone, Copy)]
38    kind: Command,
39    name: TpmSetAlgorithmSetCommand,
40    cc: TpmCc::SetAlgorithmSet,
41    handles: {
42        pub auth_handle: crate::data::TpmiRhHierarchy,
43    },
44    parameters: {
45        pub algorithm_set: u32,
46    }
47}
48
49tpm_struct! {
50    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
51    kind: Response,
52    name: TpmSetAlgorithmSetResponse,
53    cc: TpmCc::SetAlgorithmSet,
54    handles: {},
55    parameters: {}
56}